// Copyright (C) INFINI Labs & INFINI LIMITED.
//
// The INFINI Framework is offered under the GNU Affero General Public License v3.0
// and as commercial software.
//
// For commercial licensing, contact us at:
//   - Website: infinilabs.com
//   - Email: hello@infini.ltd
//
// Open Source licensed under AGPL V3:
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

/*
Copyright 2016 Medcl (m AT medcl.net)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package util

import (
	"bufio"
	"bytes"
	"fmt"
	"reflect"
	"strings"
	"testing"

	"github.com/buger/jsonparser"
	"github.com/stretchr/testify/assert"
)

func TestUnsafeStringToBytes(t *testing.T) {
	testCases := []struct {
		name   string
		input  string
		expect []byte
	}{
		{
			name:   "Non-empty string",
			input:  "hello world",
			expect: []byte("hello world"),
		},
		{
			name:   "Empty string",
			input:  "",
			expect: []byte{},
		},
		{
			name:   "String with special characters",
			input:  "~!@#$%^&*()_+=-`",
			expect: []byte("~!@#$%^&*()_+=-`"),
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			result := UnsafeStringToBytes(tc.input)

			// DeepEqual is necessary because we are comparing slices
			if !reflect.DeepEqual(result, tc.expect) {
				t.Errorf("UnsafeStringToBytes(%q) = %q, expected %q", tc.input, result, tc.expect)
			}

			// *** IMPORTANT: DO NOT MODIFY THE RESULT SLICE OR THE INPUT STRING AFTER THIS POINT! ***
		})
	}
}

func TestUnsafeBytesToString(t *testing.T) {
	testCases := []struct {
		name   string
		input  []byte
		expect string
	}{
		{
			name:   "Non-empty byte slice",
			input:  []byte("hello world"),
			expect: "hello world",
		},
		{
			name:   "Empty byte slice",
			input:  []byte{},
			expect: "",
		},
		{
			name:   "Byte slice with special characters",
			input:  []byte("~!@#$%^&*()_+=-`"),
			expect: "~!@#$%^&*()_+=-`",
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			result := UnsafeBytesToString(tc.input)

			if result != tc.expect {
				t.Errorf("UnsafeBytesToString(%q) = %q, expected %q", tc.input, result, tc.expect)
			}

			// *** IMPORTANT: DO NOT MODIFY THE RESULT STRING OR THE INPUT BYTE SLICE AFTER THIS POINT! ***
		})
	}
}

// This test demonstrates the dangers of modifying the byte slice after creating the string
func TestUnsafeBytesToStringMutation(t *testing.T) {
	bs := []byte("initial")
	str := UnsafeBytesToString(bs)

	// This will modify the string!
	bs[0] = 'M'

	if str != "Mnitial" {
		t.Errorf("String was not mutated as expected! str = %q", str)
	}

	// VERY IMPORTANT: this can lead to crashes, data corruption and undefined behavior
}

var splitBytes = []byte("\",")
var searchLen = len(splitBytes)

//func BytesIndex(data *[]byte, item *[]byte, reverse bool) int {
//
//	if !reverse {
//		return bytes.Index(*data, *item)
//	}
//
//	itemLength := len(*item)
//	lastHit := (*item)[itemLength-1]
//	candidateBuffer := make([]byte, itemLength)
//	candidateOffset := itemLength - 1
//	startMatch := false
//
//	if last := len(*data) - 1; last >= 0 {
//		for i, element := last, (*data)[0]; i >= 0; i-- {
//			element = (*data)[i]
//
//			if !startMatch && element == lastHit {
//				startMatch = true
//				candidateBuffer[candidateOffset] = element
//				candidateOffset--
//
//			} else if startMatch && candidateOffset >= 0 {
//				candidateBuffer[candidateOffset] = element
//				candidateOffset = itemLength - 1
//
//				if bytes.Equal(candidateBuffer, *item) {
//					return i
//				} else {
//					startMatch = false
//				}
//			}
//		}
//	}
//	return -1
//}
//
//func TestBytesLastIndex(t *testing.T) {
//	data := []byte("i am groot!")
//	item := []byte("am")
//
//	index := bytes.LastIndex(data, item)
//	//fmt.Println(index)
//	index1 := BytesIndex(&data, &item, false)
//	//fmt.Println(index1)
//	index2 := BytesIndex(&data, &item, true)
//	//fmt.Println(index2)
//	assert.Equal(t, index, index1)
//	assert.Equal(t, index, index2)
//}

var data = []byte("{ \"_scroll_id\" : \"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFE1XRXRHWFFCRWtvc2tfSndtTTd0AAAAAAADKEkWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\", \"took\" : 1099, \"timed_out\" : false, \"_shards\" : { \"total\" : 1, \"successful\" : 1, \"skipped\" : 0, \"failed\" : 0 }, \"hits\" : { \"total\" : { \"value\" : 34, \"relation\" : \"eq\" }, \"max_score\" : 1.0, \"hits\" : [ { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"p4l7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 105.329527, 29.600591 ], [ 105.298887, 29.533501 ], [ 105.335656, 29.461938 ], [ 105.396938, 29.444047 ], [ 105.439835, 29.390375 ], [ 105.415322, 29.314339 ], [ 105.464348, 29.323284 ], [ 105.470476, 29.28303 ], [ 105.629809, 29.28303 ], [ 105.648193, 29.256194 ], [ 105.697219, 29.291975 ], [ 105.703347, 29.180158 ], [ 105.72786, 29.157794 ], [ 105.733988, 29.130958 ], [ 105.740116, 29.041504 ], [ 105.746244, 29.041504 ], [ 105.764629, 28.987832 ], [ 105.881064, 28.916269 ], [ 105.93009, 28.938632 ], [ 105.9975, 28.978887 ], [ 106.034269, 28.93416 ], [ 106.040397, 28.929687 ], [ 106.083294, 28.916269 ], [ 106.169089, 28.925214 ], [ 106.254883, 28.844706 ], [ 106.248755, 28.83576 ], [ 106.242627, 28.795506 ], [ 106.303909, 28.710525 ], [ 106.33455, 28.571872 ], [ 106.371319, 28.527145 ], [ 106.395832, 28.576344 ], [ 106.450985, 28.549508 ], [ 106.500011, 28.553981 ], [ 106.463242, 28.589762 ], [ 106.500011, 28.630017 ], [ 106.500011, 28.638962 ], [ 106.524524, 28.674743 ], [ 106.450985, 28.773143 ], [ 106.46937, 28.831288 ], [ 106.512267, 28.799979 ], [ 106.561293, 28.759725 ], [ 106.555164, 28.723943 ], [ 106.640959, 28.647907 ], [ 106.610318, 28.553981 ], [ 106.561293, 28.527145 ], [ 106.628703, 28.504781 ], [ 106.745138, 28.469 ], [ 106.720625, 28.522672 ], [ 106.781907, 28.630017 ], [ 106.80642, 28.594235 ], [ 106.855446, 28.625544 ], [ 106.861574, 28.692634 ], [ 106.818676, 28.759725 ], [ 106.928984, 28.808924 ], [ 106.984137, 28.777615 ], [ 106.978009, 28.853651 ], [ 107.051547, 28.871542 ], [ 107.094445, 28.893906 ], [ 107.174111, 28.88496 ], [ 107.180239, 28.889433 ], [ 107.21088, 28.83576 ], [ 107.21088, 28.773143 ], [ 107.382469, 28.849179 ], [ 107.437623, 28.956523 ], [ 107.357957, 29.014668 ], [ 107.388598, 29.037032 ], [ 107.364085, 29.099649 ], [ 107.406982, 29.099649 ], [ 107.394726, 29.189103 ], [ 107.437623, 29.206994 ], [ 107.48052, 29.175685 ], [ 107.554059, 29.224885 ], [ 107.578571, 29.162267 ], [ 107.658238, 29.16674 ], [ 107.695007, 29.144376 ], [ 107.744032, 29.202521 ], [ 107.805314, 29.144376 ], [ 107.780801, 29.05045 ], [ 107.817571, 29.037032 ], [ 107.805314, 28.987832 ], [ 107.860468, 28.965469 ], [ 107.878852, 29.010196 ], [ 107.934006, 29.037032 ], [ 108.007544, 29.037032 ], [ 108.062698, 29.090704 ], [ 108.130108, 29.054923 ], [ 108.19139, 29.072813 ], [ 108.240415, 29.032559 ], [ 108.264928, 29.095177 ], [ 108.295569, 29.090704 ], [ 108.301697, 29.010196 ], [ 108.344594, 28.943105 ], [ 108.350723, 28.81787 ], [ 108.381364, 28.777615 ], [ 108.32621, 28.679216 ], [ 108.436517, 28.634489 ], [ 108.497799, 28.630017 ], [ 108.565209, 28.665798 ], [ 108.632619, 28.625544 ], [ 108.571337, 28.495836 ], [ 108.608106, 28.410855 ], [ 108.571337, 28.388491 ], [ 108.608106, 28.325873 ], [ 108.66326, 28.339291 ], [ 108.693901, 28.401909 ], [ 108.638747, 28.473472 ], [ 108.700029, 28.48689 ], [ 108.779696, 28.433218 ], [ 108.761311, 28.307983 ], [ 108.724542, 28.285619 ], [ 108.767439, 28.218529 ], [ 108.816465, 28.249838 ], [ 108.840977, 28.200638 ], [ 108.890003, 28.223001 ], [ 108.988054, 28.160384 ], [ 109.006438, 28.200638 ], [ 109.079977, 28.18722 ], [ 109.079977, 28.249838 ], [ 109.129002, 28.307983 ], [ 109.13513, 28.361655 ], [ 109.184156, 28.473472 ], [ 109.214797, 28.48689 ], [ 109.220925, 28.48689 ], [ 109.26995, 28.495836 ], [ 109.26995, 28.540563 ], [ 109.312848, 28.58529 ], [ 109.300591, 28.625544 ], [ 109.196412, 28.60318 ], [ 109.184156, 28.634489 ], [ 109.263822, 28.670271 ], [ 109.288335, 28.71947 ], [ 109.257694, 28.76867 ], [ 109.233181, 28.786561 ], [ 109.233181, 28.88496 ], [ 109.282207, 28.974414 ], [ 109.30672, 29.068341 ], [ 109.239309, 29.086231 ], [ 109.227053, 29.122013 ], [ 109.104489, 29.21594 ], [ 109.13513, 29.274085 ], [ 109.098361, 29.296448 ], [ 109.110618, 29.354593 ], [ 109.055464, 29.403793 ], [ 108.981926, 29.336702 ], [ 108.914516, 29.327757 ], [ 108.926772, 29.439574 ], [ 108.877747, 29.444047 ], [ 108.871618, 29.493247 ], [ 108.902259, 29.578228 ], [ 108.896131, 29.600591 ], [ 108.859362, 29.640845 ], [ 108.853234, 29.640845 ], [ 108.840977, 29.658736 ], [ 108.822593, 29.654264 ], [ 108.816465, 29.654264 ], [ 108.810337, 29.636373 ], [ 108.779696, 29.654264 ], [ 108.785824, 29.654264 ], [ 108.767439, 29.698991 ], [ 108.767439, 29.663209 ], [ 108.755183, 29.645318 ], [ 108.755183, 29.649791 ], [ 108.681645, 29.694518 ], [ 108.657132, 29.855535 ], [ 108.583594, 29.860008 ], [ 108.559081, 29.824226 ], [ 108.503927, 29.712409 ], [ 108.430389, 29.739245 ], [ 108.418133, 29.819753 ], [ 108.362979, 29.837644 ], [ 108.424261, 29.886844 ], [ 108.510055, 29.877898 ], [ 108.540696, 29.994188 ], [ 108.510055, 30.056806 ], [ 108.565209, 30.159678 ], [ 108.546825, 30.177569 ], [ 108.577466, 30.258077 ], [ 108.454902, 30.360949 ], [ 108.399748, 30.37884 ], [ 108.436517, 30.490657 ], [ 108.448774, 30.49513 ], [ 108.52844, 30.49513 ], [ 108.565209, 30.472767 ], [ 108.644876, 30.539857 ], [ 108.632619, 30.580111 ], [ 108.687773, 30.589057 ], [ 108.742927, 30.499603 ], [ 108.840977, 30.508548 ], [ 108.914516, 30.593529 ], [ 108.975798, 30.633784 ], [ 109.116746, 30.642729 ], [ 109.079977, 30.598002 ], [ 109.141259, 30.521966 ], [ 109.245438, 30.584584 ], [ 109.294463, 30.633784 ], [ 109.355745, 30.553275 ], [ 109.361873, 30.499603 ], [ 109.429283, 30.598002 ], [ 109.521206, 30.665093 ], [ 109.570231, 30.647202 ], [ 109.594744, 30.700874 ], [ 109.64377, 30.718765 ], [ 109.649898, 30.763492 ], [ 109.77859, 30.852946 ], [ 109.888897, 30.902145 ], [ 109.993076, 30.884255 ], [ 110.011461, 30.830582 ], [ 110.078871, 30.803746 ], [ 110.146281, 30.911091 ], [ 110.170794, 30.982654 ], [ 110.134025, 30.991599 ], [ 110.11564, 31.094471 ], [ 110.18305, 31.130253 ], [ 110.152409, 31.259961 ], [ 110.140153, 31.385196 ], [ 110.04823, 31.412032 ], [ 109.98082, 31.479123 ], [ 109.974692, 31.514904 ], [ 109.888897, 31.519377 ], [ 109.833743, 31.559631 ], [ 109.729564, 31.546213 ], [ 109.760205, 31.604358 ], [ 109.729564, 31.631195 ], [ 109.729564, 31.702758 ], [ 109.582488, 31.729594 ], [ 109.496693, 31.716176 ], [ 109.294463, 31.711703 ], [ 109.245438, 31.765375 ], [ 109.26995, 31.801157 ], [ 109.190284, 31.819048 ], [ 109.196412, 31.845884 ], [ 109.073849, 31.93981 ], [ 108.9329, 31.993483 ], [ 108.86549, 32.002428 ], [ 108.840977, 32.042682 ], [ 108.767439, 32.0561 ], [ 108.749055, 32.096355 ], [ 108.669388, 32.1053 ], [ 108.583594, 32.172391 ], [ 108.503927, 32.203699 ], [ 108.473286, 32.181336 ], [ 108.399748, 32.199227 ], [ 108.381364, 32.1545 ], [ 108.448774, 32.078464 ], [ 108.369107, 32.078464 ], [ 108.32621, 32.020319 ], [ 108.369107, 31.98901 ], [ 108.264928, 31.98901 ], [ 108.277184, 31.917447 ], [ 108.381364, 31.854829 ], [ 108.448774, 31.787739 ], [ 108.52844, 31.75643 ], [ 108.503927, 31.738539 ], [ 108.52844, 31.671449 ], [ 108.381364, 31.59094 ], [ 108.387492, 31.546213 ], [ 108.338466, 31.510432 ], [ 108.222031, 31.510432 ], [ 108.197518, 31.398614 ], [ 108.148493, 31.376251 ], [ 108.179133, 31.327051 ], [ 108.05657, 31.255488 ], [ 108.025929, 31.219707 ], [ 108.081083, 31.188398 ], [ 108.007544, 31.116835 ], [ 108.038185, 31.036326 ], [ 107.983032, 30.987127 ], [ 107.940134, 30.991599 ], [ 107.934006, 30.937927 ], [ 107.98916, 30.911091 ], [ 107.835955, 30.794801 ], [ 107.750161, 30.839528 ], [ 107.713391, 30.8932 ], [ 107.633725, 30.817164 ], [ 107.572443, 30.848473 ], [ 107.48052, 30.839528 ], [ 107.486649, 30.812691 ], [ 107.486649, 30.808219 ], [ 107.456008, 30.785855 ], [ 107.449879, 30.77691 ], [ 107.419239, 30.750074 ], [ 107.474392, 30.665093 ], [ 107.511161, 30.651674 ], [ 107.425367, 30.553275 ], [ 107.339572, 30.42804 ], [ 107.253778, 30.258077 ], [ 107.069932, 30.061279 ], [ 107.00865, 30.043388 ], [ 106.984137, 30.083642 ], [ 106.94124, 30.047861 ], [ 106.788036, 30.016552 ], [ 106.732882, 30.025497 ], [ 106.702241, 30.128369 ], [ 106.653215, 30.168623 ], [ 106.628703, 30.199932 ], [ 106.628703, 30.217823 ], [ 106.610318, 30.293859 ], [ 106.555164, 30.320695 ], [ 106.408088, 30.275968 ], [ 106.414216, 30.253605 ], [ 106.303909, 30.240187 ], [ 106.261012, 30.19546 ], [ 106.224242, 30.21335 ], [ 106.19973, 30.231241 ], [ 106.193602, 30.235714 ], [ 106.175217, 30.240187 ], [ 106.175217, 30.244659 ], [ 106.175217, 30.249132 ], [ 106.175217, 30.271495 ], [ 106.150704, 30.31175 ], [ 106.13232, 30.316222 ], [ 106.126192, 30.316222 ], [ 106.126192, 30.307277 ], [ 106.120063, 30.307277 ], [ 106.101679, 30.316222 ], [ 106.028141, 30.37884 ], [ 105.874936, 30.387785 ], [ 105.819782, 30.441458 ], [ 105.764629, 30.401204 ], [ 105.7585, 30.392258 ], [ 105.740116, 30.320695 ], [ 105.709475, 30.325168 ], [ 105.715603, 30.253605 ], [ 105.697219, 30.258077 ], [ 105.617552, 30.275968 ], [ 105.642065, 30.190987 ], [ 105.55627, 30.186514 ], [ 105.544014, 30.155205 ], [ 105.574655, 30.128369 ], [ 105.635937, 30.074697 ], [ 105.746244, 30.021025 ], [ 105.746244, 30.012079 ], [ 105.72786, 29.998661 ], [ 105.72786, 29.994188 ], [ 105.709475, 29.931571 ], [ 105.733988, 29.895789 ], [ 105.684962, 29.855535 ], [ 105.580783, 29.824226 ], [ 105.562399, 29.725827 ], [ 105.482732, 29.721354 ], [ 105.476604, 29.6811 ], [ 105.384681, 29.672154 ], [ 105.384681, 29.667682 ], [ 105.329527, 29.600591 ] ], [ [ 108.810337, 29.636373 ], [ 108.816465, 29.636373 ], [ 108.816465, 29.6319 ], [ 108.810337, 29.636373 ] ] ] }, \"iso_3166_2\" : \"CN-CQ\", \"division_code\" : \"50\", \"label_en\" : \"Chongqing\", \"label_zh\" : \"é\u0087\u008Dåº\u0086å¸\u0082\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"qIl7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 116.789233, 39.565754 ], [ 116.783105, 39.556809 ], [ 116.80149, 39.529973 ], [ 116.807618, 39.498664 ], [ 116.789233, 39.449464 ], [ 116.838259, 39.436046 ], [ 116.838259, 39.440519 ], [ 116.850515, 39.418156 ], [ 116.856643, 39.351065 ], [ 116.887284, 39.333174 ], [ 116.881156, 39.333174 ], [ 116.881156, 39.22583 ], [ 116.862772, 39.154267 ], [ 116.924053, 39.136376 ], [ 116.856643, 39.046922 ], [ 116.752464, 39.046922 ], [ 116.703439, 38.926159 ], [ 116.727952, 38.791978 ], [ 116.758592, 38.738306 ], [ 116.862772, 38.747251 ], [ 116.875028, 38.684634 ], [ 117.040489, 38.702524 ], [ 117.046617, 38.639907 ], [ 117.095643, 38.586234 ], [ 117.150796, 38.617543 ], [ 117.181437, 38.622016 ], [ 117.212078, 38.644379 ], [ 117.248847, 38.554926 ], [ 117.365283, 38.563871 ], [ 117.47559, 38.617543 ], [ 117.518487, 38.604125 ], [ 117.634923, 38.617543 ], [ 117.61041, 38.729361 ], [ 117.659436, 38.859069 ], [ 117.739102, 38.89485 ], [ 117.818768, 38.899323 ], [ 117.843281, 39.01114 ], [ 117.781999, 39.091649 ], [ 117.794256, 39.114012 ], [ 117.971973, 39.203466 ], [ 118.057768, 39.230302 ], [ 118.002614, 39.288447 ], [ 117.996486, 39.288447 ], [ 117.978101, 39.297393 ], [ 117.965845, 39.310811 ], [ 117.965845, 39.315284 ], [ 117.843281, 39.328702 ], [ 117.84872819568727, 39.36050782716816 ], [ 117.849409, 39.360011 ], [ 117.861666, 39.453937 ], [ 117.904563, 39.5255 ], [ 117.904563, 39.538918 ], [ 117.929076, 39.5747 ], [ 117.800384, 39.601536 ], [ 117.702333, 39.5747 ], [ 117.622667, 39.601536 ], [ 117.641051, 39.623899 ], [ 117.653307, 39.677572 ], [ 117.579769, 39.717826 ], [ 117.579769, 39.731244 ], [ 117.549128, 39.771498 ], [ 117.561385, 39.798335 ], [ 117.536872, 39.829643 ], [ 117.536872, 39.834116 ], [ 117.506231, 39.905679 ], [ 117.506231, 39.910152 ], [ 117.506231, 39.914625 ], [ 117.500103, 39.914625 ], [ 117.506231, 39.919097 ], [ 117.561385, 39.99066 ], [ 117.573641, 39.995133 ], [ 117.592026, 39.995133 ], [ 117.592026, 39.99066 ], [ 117.616538, 39.968297 ], [ 117.702333, 39.986188 ], [ 117.775871, 39.963824 ], [ 117.763615, 40.021969 ], [ 117.74523, 40.048805 ], [ 117.74523, 40.044333 ], [ 117.708461, 40.080114 ], [ 117.683948, 40.084587 ], [ 117.67782, 40.084587 ], [ 117.671692, 40.084587 ], [ 117.671692, 40.08906 ], [ 117.665564, 40.093532 ], [ 117.665564, 40.098005 ], [ 117.653307, 40.093532 ], [ 117.647179, 40.10695 ], [ 117.647179, 40.120369 ], [ 117.622667, 40.142732 ], [ 117.616538, 40.147205 ], [ 117.61041, 40.151677 ], [ 117.561385, 40.209822 ], [ 117.530744, 40.227713 ], [ 117.414308, 40.245604 ], [ 117.383667, 40.227713 ], [ 117.353026, 40.169568 ], [ 117.291745, 40.120369 ], [ 117.20595, 40.080114 ], [ 117.199822, 40.066696 ], [ 117.193694, 40.066696 ], [ 117.187565, 40.008551 ], [ 117.187565, 39.999606 ], [ 117.175309, 39.968297 ], [ 117.175309, 39.963824 ], [ 117.169181, 39.963824 ], [ 117.144668, 39.941461 ], [ 117.144668, 39.932515 ], [ 117.13854, 39.92357 ], [ 117.13854, 39.919097 ], [ 117.150796, 39.878843 ], [ 117.163053, 39.869898 ], [ 117.230463, 39.834116 ], [ 117.150796, 39.820698 ], [ 117.156924, 39.793862 ], [ 117.199822, 39.762553 ], [ 117.156924, 39.735717 ], [ 117.156924, 39.717826 ], [ 117.163053, 39.708881 ], [ 117.156924, 39.659681 ], [ 117.156924, 39.655208 ], [ 117.144668, 39.623899 ], [ 117.046617, 39.650736 ], [ 116.973079, 39.64179 ], [ 116.948566, 39.708881 ], [ 116.887284, 39.695463 ], [ 116.887284, 39.69099 ], [ 116.887284, 39.686517 ], [ 116.832131, 39.619427 ], [ 116.807618, 39.614954 ], [ 116.795362, 39.565754 ], [ 116.789233, 39.565754 ] ], [ [ 117.634923, 39.333174 ], [ 117.536872, 39.337647 ], [ 117.567513, 39.404737 ], [ 117.732974, 39.40921 ], [ 117.751358, 39.360011 ], [ 117.634923, 39.333174 ] ] ] }, \"iso_3166_2\" : \"CN-TJ\", \"division_code\" : \"12\", \"label_en\" : \"Tianjin\", \"label_zh\" : \"å¤©æ´¥å¸\u0082\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"qYl7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 113.547424, 22.135664 ], [ 113.571936, 22.077519 ], [ 113.608705, 22.077519 ], [ 113.62709, 22.166973 ], [ 113.602577, 22.202755 ], [ 113.535167, 22.2117 ], [ 113.547424, 22.135664 ] ] ] }, \"iso_3166_2\" : \"CN-MO\", \"division_code\" : \"82\", \"label_en\" : \"Macau\", \"label_zh\" : \"æ¾³é\u0096\u0080\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"qol7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 109.747949, 21.576577 ], [ 109.784718, 21.478178 ], [ 109.656026, 21.366361 ], [ 109.50895, 21.254543 ], [ 109.459924, 21.147199 ], [ 109.472181, 21.035381 ], [ 109.447668, 20.945927 ], [ 109.490565, 20.708875 ], [ 109.545719, 20.547858 ], [ 109.613129, 20.471822 ], [ 109.705052, 20.216878 ], [ 109.864384, 20.118479 ], [ 110.176922, 20.149788 ], [ 110.354639, 20.185569 ], [ 110.648792, 20.266078 ], [ 110.869407, 20.315278 ], [ 111.12679, 20.342114 ], [ 111.757994, 20.288441 ], [ 112.487248, 21.285852 ], [ 112.84881, 21.375306 ], [ 114.013166, 21.612359 ], [ 114.056063, 21.625777 ], [ 115.220418, 22.135664 ], [ 116.580875, 22.752896 ], [ 117.310129, 23.016785 ], [ 117.383667, 23.057039 ], [ 117.665564, 23.258311 ], [ 117.193694, 23.620599 ], [ 117.046617, 23.70558 ], [ 117.022104, 23.835288 ], [ 116.960823, 23.902379 ], [ 116.973079, 24.000778 ], [ 116.917925, 24.090232 ], [ 116.991463, 24.184158 ], [ 116.930182, 24.224413 ], [ 116.899541, 24.376484 ], [ 116.838259, 24.430156 ], [ 116.850515, 24.456993 ], [ 116.752464, 24.546447 ], [ 116.795362, 24.676155 ], [ 116.636029, 24.644846 ], [ 116.593131, 24.649318 ], [ 116.507337, 24.613537 ], [ 116.482824, 24.711936 ], [ 116.415414, 24.738772 ], [ 116.366389, 24.819281 ], [ 116.415414, 24.841644 ], [ 116.348004, 24.864008 ], [ 116.305107, 24.80139 ], [ 116.237697, 24.792445 ], [ 116.194799, 24.864008 ], [ 116.139646, 24.846117 ], [ 116.047723, 24.855062 ], [ 116.02321, 24.899789 ], [ 115.88839, 24.940044 ], [ 115.900647, 24.886371 ], [ 115.857749, 24.864008 ], [ 115.814852, 24.908735 ], [ 115.778083, 24.864008 ], [ 115.75357, 24.738772 ], [ 115.802596, 24.702991 ], [ 115.784211, 24.631428 ], [ 115.845493, 24.56881 ], [ 115.68616, 24.546447 ], [ 115.643263, 24.61801 ], [ 115.563596, 24.622482 ], [ 115.545212, 24.680627 ], [ 115.465545, 24.765609 ], [ 115.367494, 24.774554 ], [ 115.355238, 24.738772 ], [ 115.287828, 24.756663 ], [ 115.165264, 24.694045 ], [ 115.116239, 24.671682 ], [ 115.091726, 24.680627 ], [ 115.048829, 24.707464 ], [ 114.932393, 24.644846 ], [ 114.901752, 24.658264 ], [ 114.889496, 24.577755 ], [ 114.840471, 24.600119 ], [ 114.724035, 24.609064 ], [ 114.699522, 24.528556 ], [ 114.656625, 24.577755 ], [ 114.589215, 24.533028 ], [ 114.527933, 24.564337 ], [ 114.423754, 24.488301 ], [ 114.386985, 24.56881 ], [ 114.295062, 24.582228 ], [ 114.239908, 24.649318 ], [ 114.178627, 24.662737 ], [ 114.16637, 24.694045 ], [ 114.264421, 24.702991 ], [ 114.331831, 24.75219 ], [ 114.337959, 24.814808 ], [ 114.399241, 24.881899 ], [ 114.393113, 24.957934 ], [ 114.478908, 25.011607 ], [ 114.50342, 25.002661 ], [ 114.558574, 25.078697 ], [ 114.632112, 25.074224 ], [ 114.730163, 25.123424 ], [ 114.67501, 25.172624 ], [ 114.736291, 25.244187 ], [ 114.693394, 25.324695 ], [ 114.625984, 25.329168 ], [ 114.576959, 25.400731 ], [ 114.527933, 25.418622 ], [ 114.472779, 25.373895 ], [ 114.448267, 25.391786 ], [ 114.374729, 25.320223 ], [ 114.30119, 25.333641 ], [ 114.258293, 25.293386 ], [ 114.184755, 25.320223 ], [ 114.111217, 25.306805 ], [ 114.03155, 25.253132 ], [ 114.019294, 25.302332 ], [ 114.049935, 25.351532 ], [ 113.976396, 25.414149 ], [ 114.000909, 25.445458 ], [ 113.939627, 25.445458 ], [ 113.878346, 25.440985 ], [ 113.872217, 25.38284 ], [ 113.817064, 25.333641 ], [ 113.682244, 25.356004 ], [ 113.571936, 25.320223 ], [ 113.541295, 25.369422 ], [ 113.443244, 25.360477 ], [ 113.406475, 25.405204 ], [ 113.308424, 25.445458 ], [ 113.302296, 25.503603 ], [ 113.241014, 25.517021 ], [ 113.191989, 25.48124 ], [ 113.142963, 25.494658 ], [ 113.112322, 25.423095 ], [ 113.026528, 25.36495 ], [ 112.928477, 25.329168 ], [ 112.84881, 25.342586 ], [ 112.861067, 25.253132 ], [ 112.995887, 25.24866 ], [ 113.014271, 25.212878 ], [ 112.965246, 25.136842 ], [ 113.014271, 25.087643 ], [ 112.971374, 25.038443 ], [ 113.002015, 24.989243 ], [ 112.977502, 24.922153 ], [ 112.977502, 24.926626 ], [ 112.897836, 24.926626 ], [ 112.867195, 24.899789 ], [ 112.7814, 24.895317 ], [ 112.775272, 24.948989 ], [ 112.738503, 24.962407 ], [ 112.707862, 25.087643 ], [ 112.652709, 25.136842 ], [ 112.560786, 25.127897 ], [ 112.450478, 25.154733 ], [ 112.407581, 25.141315 ], [ 112.358556, 25.194987 ], [ 112.297274, 25.159206 ], [ 112.24212, 25.190515 ], [ 112.180838, 25.186042 ], [ 112.150197, 25.029498 ], [ 112.113428, 24.984771 ], [ 112.168582, 24.931098 ], [ 112.150197, 24.841644 ], [ 112.119556, 24.846117 ], [ 112.027634, 24.774554 ], [ 112.015377, 24.743245 ], [ 111.960224, 24.729827 ], [ 111.929583, 24.600119 ], [ 111.996993, 24.550919 ], [ 111.978608, 24.470411 ], [ 112.058275, 24.363066 ], [ 111.97248, 24.260194 ], [ 111.874429, 24.228885 ], [ 111.868301, 24.117068 ], [ 111.923455, 23.973942 ], [ 111.807019, 23.88896 ], [ 111.800891, 23.817397 ], [ 111.696712, 23.839761 ], [ 111.63543, 23.812925 ], [ 111.617045, 23.727943 ], [ 111.659943, 23.714525 ], [ 111.610917, 23.642962 ], [ 111.482225, 23.629544 ], [ 111.457712, 23.513254 ], [ 111.396431, 23.473 ], [ 111.390302, 23.388019 ], [ 111.353533, 23.294092 ], [ 111.390302, 23.159911 ], [ 111.371918, 23.092821 ], [ 111.427072, 23.039148 ], [ 111.353533, 22.95864 ], [ 111.353533, 22.89155 ], [ 111.286123, 22.833405 ], [ 111.286123, 22.806568 ], [ 111.188072, 22.739478 ], [ 111.12679, 22.743951 ], [ 111.053252, 22.735005 ], [ 111.083893, 22.690278 ], [ 111.053252, 22.650024 ], [ 110.949073, 22.641079 ], [ 110.887791, 22.587406 ], [ 110.765228, 22.591879 ], [ 110.740715, 22.556097 ], [ 110.740715, 22.466644 ], [ 110.679433, 22.480062 ], [ 110.710074, 22.439807 ], [ 110.703946, 22.372717 ], [ 110.783612, 22.283263 ], [ 110.716202, 22.296681 ], [ 110.642664, 22.225118 ], [ 110.673305, 22.175918 ], [ 110.599767, 22.158028 ], [ 110.556869, 22.198282 ], [ 110.501716, 22.14461 ], [ 110.409793, 22.2117 ], [ 110.373024, 22.166973 ], [ 110.342383, 22.198282 ], [ 110.323998, 22.153555 ], [ 110.348511, 22.099883 ], [ 110.348511, 21.97912 ], [ 110.366896, 21.970175 ], [ 110.373024, 21.934393 ], [ 110.379152, 21.934393 ], [ 110.38528, 21.898611 ], [ 110.336255, 21.889666 ], [ 110.287229, 21.920975 ], [ 110.232075, 21.880721 ], [ 110.195306, 21.903084 ], [ 110.04823, 21.86283 ], [ 109.993076, 21.880721 ], [ 109.937923, 21.844939 ], [ 109.937923, 21.768903 ], [ 109.907282, 21.666031 ], [ 109.790846, 21.63025 ], [ 109.790846, 21.634722 ], [ 109.766333, 21.674977 ], [ 109.747949, 21.576577 ] ], [ [ 113.547424, 22.135664 ], [ 113.535167, 22.2117 ], [ 113.602577, 22.202755 ], [ 113.62709, 22.166973 ], [ 113.608705, 22.077519 ], [ 113.571936, 22.077519 ], [ 113.547424, 22.135664 ] ], [ [ 114.147986, 22.547152 ], [ 114.23378, 22.542679 ], [ 114.276678, 22.565043 ], [ 114.43601, 22.56057 ], [ 114.454395, 22.462171 ], [ 114.50342, 22.363772 ], [ 114.50342, 22.149082 ], [ 113.939627, 22.149082 ], [ 113.921243, 22.135664 ], [ 113.817064, 22.216173 ], [ 113.866089, 22.323517 ], [ 113.866089, 22.430862 ], [ 113.994781, 22.511371 ], [ 114.056063, 22.502425 ], [ 114.147986, 22.547152 ] ] ] }, \"iso_3166_2\" : \"CN-GD\", \"division_code\" : \"44\", \"label_en\" : \"Guangdong\", \"label_zh\" : \"å¹¿ä¸\u009Cç\u009C\u0081\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"q4l7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 104.526735, 24.7343 ], [ 104.489966, 24.658264 ], [ 104.502223, 24.582228 ], [ 104.54512, 24.524083 ], [ 104.575761, 24.421211 ], [ 104.624786, 24.416738 ], [ 104.606402, 24.376484 ], [ 104.698324, 24.322812 ], [ 104.722837, 24.33623 ], [ 104.710581, 24.443575 ], [ 104.888298, 24.434629 ], [ 104.974093, 24.407793 ], [ 105.053759, 24.434629 ], [ 105.059887, 24.430156 ], [ 105.066016, 24.430156 ], [ 105.072144, 24.430156 ], [ 105.078272, 24.430156 ], [ 105.096656, 24.389902 ], [ 105.194707, 24.340703 ], [ 105.157938, 24.282558 ], [ 105.231477, 24.224413 ], [ 105.225348, 24.166267 ], [ 105.182451, 24.17074 ], [ 105.194707, 24.108122 ], [ 105.255989, 24.063396 ], [ 105.317271, 24.117068 ], [ 105.409194, 24.041032 ], [ 105.507245, 24.027614 ], [ 105.531758, 24.134959 ], [ 105.62368, 24.130486 ], [ 105.635937, 24.045505 ], [ 105.764629, 24.076814 ], [ 105.783013, 24.032087 ], [ 105.899449, 24.049977 ], [ 105.917833, 24.126013 ], [ 105.9975, 24.126013 ], [ 106.046525, 24.094704 ], [ 106.095551, 24.023141 ], [ 106.083294, 23.991832 ], [ 106.126192, 23.951578 ], [ 106.187473, 23.835288 ], [ 106.13232, 23.799507 ], [ 106.156832, 23.710053 ], [ 106.113935, 23.562454 ], [ 106.06491, 23.490891 ], [ 105.985243, 23.450636 ], [ 105.985243, 23.490891 ], [ 105.899449, 23.504309 ], [ 105.874936, 23.531145 ], [ 105.813654, 23.508781 ], [ 105.801398, 23.468527 ], [ 105.752372, 23.464054 ], [ 105.69109, 23.401437 ], [ 105.69109, 23.325401 ], [ 105.648193, 23.347764 ], [ 105.562399, 23.289619 ], [ 105.525629, 23.235947 ], [ 105.544014, 23.195693 ], [ 105.562399, 23.083875 ], [ 105.721731, 23.065985 ], [ 105.801398, 22.989949 ], [ 105.838167, 22.989949 ], [ 105.868808, 22.922858 ], [ 106.003628, 22.945222 ], [ 106.003628, 22.994422 ], [ 106.187473, 22.989949 ], [ 106.236499, 22.954167 ], [ 106.261012, 22.873659 ], [ 106.346806, 22.855768 ], [ 106.371319, 22.882604 ], [ 106.500011, 22.904968 ], [ 106.512267, 22.949695 ], [ 106.585805, 22.931804 ], [ 106.640959, 22.887077 ], [ 106.708369, 22.887077 ], [ 106.769651, 22.815514 ], [ 106.837061, 22.806568 ], [ 106.763523, 22.743951 ], [ 106.775779, 22.708169 ], [ 106.726754, 22.641079 ], [ 106.720625, 22.582934 ], [ 106.659344, 22.573988 ], [ 106.610318, 22.605297 ], [ 106.555164, 22.457698 ], [ 106.585805, 22.37719 ], [ 106.567421, 22.341408 ], [ 106.659344, 22.336935 ], [ 106.696113, 22.207227 ], [ 106.6716, 22.180391 ], [ 106.714497, 22.090937 ], [ 106.683856, 21.97912 ], [ 106.702241, 21.961229 ], [ 106.757395, 22.014901 ], [ 106.80642, 21.974647 ], [ 106.922856, 21.970175 ], [ 106.928984, 21.92992 ], [ 106.990266, 21.947811 ], [ 107.057676, 21.920975 ], [ 107.057676, 21.885193 ], [ 107.002522, 21.831521 ], [ 107.094445, 21.795739 ], [ 107.247649, 21.706286 ], [ 107.302803, 21.742067 ], [ 107.357957, 21.670504 ], [ 107.357957, 21.603414 ], [ 107.48052, 21.661559 ], [ 107.492777, 21.594468 ], [ 107.695007, 21.612359 ], [ 107.750161, 21.643668 ], [ 107.860468, 21.648141 ], [ 107.952391, 21.536323 ], [ 108.025929, 21.549741 ], [ 108.099467, 21.473705 ], [ 108.093339, 21.451342 ], [ 108.136236, 21.276907 ], [ 108.283313, 21.308216 ], [ 108.369107, 21.352943 ], [ 108.491671, 21.34847 ], [ 108.632619, 21.420033 ], [ 108.693901, 21.393197 ], [ 108.834849, 21.393197 ], [ 108.871618, 21.321634 ], [ 109.00031, 21.241125 ], [ 108.945157, 21.209816 ], [ 108.871618, 21.102472 ], [ 108.871618, 20.981709 ], [ 108.926772, 20.878837 ], [ 109.012567, 20.820692 ], [ 109.079977, 20.740184 ], [ 109.171899, 20.704402 ], [ 109.490565, 20.708875 ], [ 109.447668, 20.945927 ], [ 109.472181, 21.035381 ], [ 109.459924, 21.147199 ], [ 109.50895, 21.254543 ], [ 109.656026, 21.366361 ], [ 109.784718, 21.478178 ], [ 109.747949, 21.576577 ], [ 109.766333, 21.674977 ], [ 109.790846, 21.634722 ], [ 109.790846, 21.63025 ], [ 109.907282, 21.666031 ], [ 109.937923, 21.768903 ], [ 109.937923, 21.844939 ], [ 109.993076, 21.880721 ], [ 110.04823, 21.86283 ], [ 110.195306, 21.903084 ], [ 110.232075, 21.880721 ], [ 110.287229, 21.920975 ], [ 110.336255, 21.889666 ], [ 110.38528, 21.898611 ], [ 110.379152, 21.934393 ], [ 110.373024, 21.934393 ], [ 110.366896, 21.970175 ], [ 110.348511, 21.97912 ], [ 110.348511, 22.099883 ], [ 110.323998, 22.153555 ], [ 110.342383, 22.198282 ], [ 110.373024, 22.166973 ], [ 110.409793, 22.2117 ], [ 110.501716, 22.14461 ], [ 110.556869, 22.198282 ], [ 110.599767, 22.158028 ], [ 110.673305, 22.175918 ], [ 110.642664, 22.225118 ], [ 110.716202, 22.296681 ], [ 110.783612, 22.283263 ], [ 110.703946, 22.372717 ], [ 110.710074, 22.439807 ], [ 110.679433, 22.480062 ], [ 110.740715, 22.466644 ], [ 110.740715, 22.556097 ], [ 110.765228, 22.591879 ], [ 110.887791, 22.587406 ], [ 110.949073, 22.641079 ], [ 111.053252, 22.650024 ], [ 111.083893, 22.690278 ], [ 111.053252, 22.735005 ], [ 111.12679, 22.743951 ], [ 111.188072, 22.739478 ], [ 111.286123, 22.806568 ], [ 111.286123, 22.833405 ], [ 111.353533, 22.89155 ], [ 111.353533, 22.95864 ], [ 111.427072, 23.039148 ], [ 111.371918, 23.092821 ], [ 111.390302, 23.159911 ], [ 111.353533, 23.294092 ], [ 111.390302, 23.388019 ], [ 111.396431, 23.473 ], [ 111.457712, 23.513254 ], [ 111.482225, 23.629544 ], [ 111.610917, 23.642962 ], [ 111.659943, 23.714525 ], [ 111.617045, 23.727943 ], [ 111.63543, 23.812925 ], [ 111.696712, 23.839761 ], [ 111.800891, 23.817397 ], [ 111.807019, 23.88896 ], [ 111.923455, 23.973942 ], [ 111.868301, 24.117068 ], [ 111.874429, 24.228885 ], [ 111.97248, 24.260194 ], [ 112.058275, 24.363066 ], [ 111.978608, 24.470411 ], [ 111.996993, 24.550919 ], [ 111.929583, 24.600119 ], [ 111.960224, 24.729827 ], [ 112.015377, 24.743245 ], [ 111.941839, 24.774554 ], [ 111.70284, 24.787972 ], [ 111.63543, 24.7343 ], [ 111.63543, 24.6851 ], [ 111.592533, 24.698518 ], [ 111.56802, 24.649318 ], [ 111.512866, 24.644846 ], [ 111.427072, 24.694045 ], [ 111.476097, 24.80139 ], [ 111.439328, 24.895317 ], [ 111.463841, 24.931098 ], [ 111.427072, 24.984771 ], [ 111.457712, 25.025025 ], [ 111.408687, 25.051861 ], [ 111.4332, 25.101061 ], [ 111.371918, 25.132369 ], [ 111.353533, 25.105533 ], [ 111.255482, 25.145788 ], [ 111.194201, 25.078697 ], [ 111.09615, 25.038443 ], [ 111.09615, 24.948989 ], [ 110.998099, 24.922153 ], [ 110.961329, 24.980298 ], [ 110.949073, 25.051861 ], [ 111.004227, 25.172624 ], [ 111.108406, 25.221823 ], [ 111.09615, 25.284441 ], [ 111.169688, 25.360477 ], [ 111.23097, 25.378368 ], [ 111.322892, 25.49913 ], [ 111.341277, 25.606475 ], [ 111.304508, 25.642257 ], [ 111.310636, 25.731711 ], [ 111.384174, 25.736183 ], [ 111.439328, 25.776437 ], [ 111.427072, 25.848001 ], [ 111.488353, 25.870364 ], [ 111.378046, 25.883782 ], [ 111.341277, 25.910618 ], [ 111.286123, 25.856946 ], [ 111.243226, 25.870364 ], [ 111.188072, 25.955345 ], [ 111.237098, 26.080581 ], [ 111.267739, 26.120835 ], [ 111.273867, 26.277379 ], [ 111.224841, 26.263961 ], [ 111.200329, 26.313161 ], [ 111.083893, 26.308688 ], [ 110.998099, 26.339997 ], [ 110.979714, 26.384724 ], [ 110.918432, 26.322106 ], [ 110.936817, 26.290797 ], [ 110.759099, 26.250543 ], [ 110.746843, 26.29527 ], [ 110.605895, 26.331052 ], [ 110.550741, 26.290797 ], [ 110.538485, 26.223707 ], [ 110.489459, 26.170035 ], [ 110.446562, 26.170035 ], [ 110.366896, 26.093999 ], [ 110.330126, 25.982181 ], [ 110.299485, 25.973236 ], [ 110.25046, 25.991127 ], [ 110.244332, 25.9956 ], [ 110.244332, 26.004545 ], [ 110.244332, 26.009018 ], [ 110.189178, 26.067163 ], [ 110.158537, 26.017963 ], [ 110.066614, 26.044799 ], [ 110.103384, 26.134253 ], [ 110.097255, 26.170035 ], [ 110.029845, 26.165562 ], [ 109.962435, 26.196871 ], [ 109.907282, 26.147671 ], [ 109.864384, 26.031381 ], [ 109.809231, 26.049272 ], [ 109.77859, 25.9956 ], [ 109.827615, 25.910618 ], [ 109.77859, 25.865891 ], [ 109.766333, 25.892728 ], [ 109.680539, 25.883782 ], [ 109.686667, 25.964291 ], [ 109.723436, 25.9956 ], [ 109.619257, 26.049272 ], [ 109.533462, 26.004545 ], [ 109.478309, 26.031381 ], [ 109.410899, 25.977709 ], [ 109.423155, 25.919564 ], [ 109.361873, 25.839055 ], [ 109.331232, 25.839055 ], [ 109.33736, 25.736183 ], [ 109.251566, 25.722765 ], [ 109.20254, 25.740656 ], [ 109.20254, 25.789856 ], [ 109.141259, 25.745129 ], [ 109.141259, 25.798801 ], [ 109.073849, 25.78091 ], [ 109.024823, 25.798801 ], [ 108.975798, 25.749601 ], [ 108.908388, 25.731711 ], [ 108.890003, 25.686984 ], [ 108.945157, 25.678038 ], [ 109.00031, 25.740656 ], [ 109.06772, 25.731711 ], [ 109.037079, 25.642257 ], [ 109.037079, 25.530439 ], [ 109.012567, 25.517021 ], [ 108.945157, 25.561748 ], [ 108.890003, 25.543857 ], [ 108.779696, 25.561748 ], [ 108.779696, 25.624366 ], [ 108.681645, 25.628839 ], [ 108.681645, 25.588584 ], [ 108.59585, 25.458876 ], [ 108.589722, 25.409677 ], [ 108.626491, 25.338113 ], [ 108.479415, 25.463349 ], [ 108.412005, 25.445458 ], [ 108.39362, 25.494658 ], [ 108.313954, 25.530439 ], [ 108.277184, 25.48124 ], [ 108.154621, 25.445458 ], [ 108.19139, 25.409677 ], [ 108.136236, 25.391786 ], [ 108.148493, 25.311277 ], [ 108.111723, 25.212878 ], [ 108.001416, 25.19946 ], [ 107.842083, 25.118951 ], [ 107.756289, 25.127897 ], [ 107.78693, 25.159206 ], [ 107.756289, 25.239714 ], [ 107.701135, 25.19946 ], [ 107.658238, 25.262078 ], [ 107.65211, 25.320223 ], [ 107.511161, 25.208405 ], [ 107.468264, 25.217351 ], [ 107.474392, 25.302332 ], [ 107.425367, 25.293386 ], [ 107.400854, 25.356004 ], [ 107.419239, 25.387313 ], [ 107.364085, 25.405204 ], [ 107.308931, 25.405204 ], [ 107.333444, 25.463349 ], [ 107.198624, 25.61542 ], [ 107.137342, 25.566221 ], [ 107.063804, 25.561748 ], [ 107.045419, 25.508076 ], [ 107.00865, 25.49913 ], [ 106.996394, 25.445458 ], [ 106.959625, 25.440985 ], [ 106.984137, 25.360477 ], [ 107.00865, 25.356004 ], [ 107.00865, 25.279968 ], [ 106.965753, 25.239714 ], [ 106.922856, 25.253132 ], [ 106.898343, 25.194987 ], [ 106.726754, 25.163678 ], [ 106.634831, 25.163678 ], [ 106.634831, 25.136842 ], [ 106.512267, 25.056334 ], [ 106.352934, 24.993716 ], [ 106.205858, 24.984771 ], [ 106.138448, 24.957934 ], [ 106.193602, 24.890844 ], [ 106.19973, 24.832699 ], [ 106.13232, 24.729827 ], [ 106.040397, 24.6851 ], [ 106.009756, 24.6359 ], [ 105.948474, 24.689573 ], [ 105.942346, 24.729827 ], [ 105.813654, 24.702991 ], [ 105.703347, 24.774554 ], [ 105.611424, 24.80139 ], [ 105.494988, 24.810335 ], [ 105.427578, 24.931098 ], [ 105.35404, 24.944516 ], [ 105.262117, 24.931098 ], [ 105.206964, 24.998189 ], [ 105.072144, 24.91768 ], [ 105.035375, 24.877426 ], [ 105.029246, 24.792445 ], [ 104.863785, 24.738772 ], [ 104.839273, 24.680627 ], [ 104.759606, 24.658264 ], [ 104.741222, 24.622482 ], [ 104.630914, 24.662737 ], [ 104.588017, 24.716409 ], [ 104.526735, 24.7343 ] ] ] }, \"iso_3166_2\" : \"CN-GX\", \"division_code\" : \"45\", \"label_en\" : \"Guangxi Zhuang Autonomous Region\", \"label_zh\" : \"å¹¿è¥¿å£®æ\u0097\u008Fè\u0087ªæ²»å\u008Cº\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"rIl7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"multipolygon\", \"coordinates\" : [ [ [ [ 117.242719, 34.466883 ], [ 117.169181, 34.471355 ], [ 117.13854, 34.502664 ], [ 117.144668, 34.569755 ], [ 117.07113, 34.699463 ], [ 117.015976, 34.762081 ], [ 116.960823, 34.771026 ], [ 116.973079, 34.815753 ], [ 116.917925, 34.896261 ], [ 116.776977, 34.945461 ], [ 116.764721, 34.918625 ], [ 116.623772, 34.940988 ], [ 116.550234, 34.914152 ], [ 116.446055, 34.905207 ], [ 116.409286, 34.851535 ], [ 116.366389, 34.641318 ], [ 116.421542, 34.654736 ], [ 116.488952, 34.569755 ], [ 116.587003, 34.51161 ], [ 116.562491, 34.493719 ], [ 116.721823, 34.475828 ], [ 116.826002, 34.390847 ], [ 116.917925, 34.408738 ], [ 116.973079, 34.350593 ], [ 116.966951, 34.283502 ], [ 117.052745, 34.211939 ], [ 117.028233, 34.171685 ], [ 117.120155, 34.126958 ], [ 117.181437, 34.073286 ], [ 117.304001, 34.068813 ], [ 117.346898, 34.091176 ], [ 117.402052, 34.028559 ], [ 117.500103, 34.06434 ], [ 117.567513, 33.983832 ], [ 117.604282, 34.033031 ], [ 117.665564, 33.992777 ], [ 117.665564, 33.934632 ], [ 117.708461, 33.88096 ], [ 117.751358, 33.889905 ], [ 117.74523, 33.719943 ], [ 117.794256, 33.742306 ], [ 117.886178, 33.728888 ], [ 117.978101, 33.755724 ], [ 118.106793, 33.769142 ], [ 118.174203, 33.733361 ], [ 118.155819, 33.661798 ], [ 118.106793, 33.621544 ], [ 118.100665, 33.487363 ], [ 118.051639, 33.496308 ], [ 118.01487, 33.424745 ], [ 118.020999, 33.375545 ], [ 117.959717, 33.348709 ], [ 117.965845, 33.281619 ], [ 117.929076, 33.227946 ], [ 117.971973, 33.227946 ], [ 117.990358, 33.174274 ], [ 118.051639, 33.138493 ], [ 118.143562, 33.169801 ], [ 118.168075, 33.219001 ], [ 118.2171, 33.183219 ], [ 118.210972, 33.116129 ], [ 118.241613, 32.995366 ], [ 118.302895, 32.964057 ], [ 118.229357, 32.928276 ], [ 118.241613, 32.861185 ], [ 118.296767, 32.847767 ], [ 118.296767, 32.780677 ], [ 118.358049, 32.776204 ], [ 118.364177, 32.722532 ], [ 118.462228, 32.722532 ], [ 118.615433, 32.744895 ], [ 118.701227, 32.727005 ], [ 118.744124, 32.73595 ], [ 118.750253, 32.73595 ], [ 118.750253, 32.740423 ], [ 118.737996, 32.767259 ], [ 118.731868, 32.767259 ], [ 118.737996, 32.811986 ], [ 118.737996, 32.816459 ], [ 118.737996, 32.856713 ], [ 118.774765, 32.85224 ], [ 118.799278, 32.856713 ], [ 118.799278, 32.861185 ], [ 118.805406, 32.861185 ], [ 118.805406, 32.865658 ], [ 118.805406, 32.870131 ], [ 118.805406, 32.874604 ], [ 118.805406, 32.905912 ], [ 118.836047, 32.923803 ], [ 118.842175, 32.946167 ], [ 118.842175, 32.950639 ], [ 118.866688, 32.959585 ], [ 118.872816, 32.959585 ], [ 118.878944, 32.959585 ], [ 118.878944, 32.964057 ], [ 118.891201, 32.941694 ], [ 118.891201, 32.946167 ], [ 118.897329, 32.946167 ], [ 118.92797, 32.941694 ], [ 118.970867, 32.955112 ], [ 119.019893, 32.950639 ], [ 119.019893, 32.937221 ], [ 119.013765, 32.910385 ], [ 119.099559, 32.820931 ], [ 119.179226, 32.829877 ], [ 119.209866, 32.633078 ], [ 119.215995, 32.601769 ], [ 119.209866, 32.592824 ], [ 119.209866, 32.579406 ], [ 119.185354, 32.597297 ], [ 119.166969, 32.579406 ], [ 119.166969, 32.574933 ], [ 119.154713, 32.565988 ], [ 119.148585, 32.565988 ], [ 119.148585, 32.561515 ], [ 119.160841, 32.534679 ], [ 119.148585, 32.539151 ], [ 119.148585, 32.534679 ], [ 119.148585, 32.525733 ], [ 119.136328, 32.494425 ], [ 119.056662, 32.467588 ], [ 119.056662, 32.476534 ], [ 119.056662, 32.481006 ], [ 119.056662, 32.485479 ], [ 119.06279, 32.485479 ], [ 119.056662, 32.489952 ], [ 119.026021, 32.516788 ], [ 119.013765, 32.516788 ], [ 118.970867, 32.507843 ], [ 118.92797, 32.561515 ], [ 118.921842, 32.557042 ], [ 118.915714, 32.557042 ], [ 118.915714, 32.561515 ], [ 118.909585, 32.561515 ], [ 118.909585, 32.557042 ], [ 118.903457, 32.557042 ], [ 118.885073, 32.557042 ], [ 118.885073, 32.561515 ], [ 118.891201, 32.565988 ], [ 118.885073, 32.588351 ], [ 118.885073, 32.592824 ], [ 118.878944, 32.579406 ], [ 118.842175, 32.574933 ], [ 118.842175, 32.57046 ], [ 118.836047, 32.574933 ], [ 118.823791, 32.574933 ], [ 118.823791, 32.579406 ], [ 118.811534, 32.601769 ], [ 118.780894, 32.583878 ], [ 118.780894, 32.588351 ], [ 118.768637, 32.597297 ], [ 118.750253, 32.606242 ], [ 118.744124, 32.601769 ], [ 118.72574, 32.592824 ], [ 118.719612, 32.592824 ], [ 118.719612, 32.597297 ], [ 118.719612, 32.610715 ], [ 118.713483, 32.610715 ], [ 118.701227, 32.610715 ], [ 118.695099, 32.606242 ], [ 118.688971, 32.597297 ], [ 118.639945, 32.588351 ], [ 118.627689, 32.583878 ], [ 118.560279, 32.561515 ], [ 118.603176, 32.543624 ], [ 118.584792, 32.485479 ], [ 118.646073, 32.476534 ], [ 118.682843, 32.458643 ], [ 118.688971, 32.378134 ], [ 118.652202, 32.297626 ], [ 118.670586, 32.252899 ], [ 118.584792, 32.199227 ], [ 118.492869, 32.181336 ], [ 118.498997, 32.141082 ], [ 118.38869, 32.078464 ], [ 118.376433, 31.971119 ], [ 118.364177, 31.930865 ], [ 118.468356, 31.877193 ], [ 118.498997, 31.841411 ], [ 118.474484, 31.778793 ], [ 118.52351, 31.738539 ], [ 118.633817, 31.760903 ], [ 118.688971, 31.711703 ], [ 118.639945, 31.649085 ], [ 118.707355, 31.64014 ], [ 118.713483, 31.64014 ], [ 118.737996, 31.653558 ], [ 118.854432, 31.626722 ], [ 118.872816, 31.546213 ], [ 118.878944, 31.497014 ], [ 118.842175, 31.394142 ], [ 118.744124, 31.385196 ], [ 118.713483, 31.295742 ], [ 118.799278, 31.233125 ], [ 118.842175, 31.237597 ], [ 118.848304, 31.24207 ], [ 118.86056, 31.24207 ], [ 118.866688, 31.24207 ], [ 119.099559, 31.237597 ], [ 119.148585, 31.295742 ], [ 119.19761, 31.295742 ], [ 119.234379, 31.255488 ], [ 119.375327, 31.268906 ], [ 119.356943, 31.197343 ], [ 119.454994, 31.157089 ], [ 119.528532, 31.161562 ], [ 119.583686, 31.112362 ], [ 119.614327, 31.130253 ], [ 119.620455, 31.130253 ], [ 119.632711, 31.134725 ], [ 119.638839, 31.139198 ], [ 119.638839, 31.148144 ], [ 119.638839, 31.152616 ], [ 119.657224, 31.157089 ], [ 119.657224, 31.161562 ], [ 119.66948, 31.166034 ], [ 119.706249, 31.161562 ], [ 119.749147, 31.17498 ], [ 119.755275, 31.17498 ], [ 119.761403, 31.179452 ], [ 119.773659, 31.179452 ], [ 119.816557, 31.157089 ], [ 119.822685, 31.157089 ], [ 119.816557, 31.166034 ], [ 119.816557, 31.170507 ], [ 119.822685, 31.17498 ], [ 119.853326, 31.170507 ], [ 119.877839, 31.166034 ], [ 119.914608, 31.170507 ], [ 119.988146, 31.036326 ], [ 120.122966, 30.946872 ], [ 120.270042, 30.928981 ], [ 120.368093, 30.946872 ], [ 120.368093, 30.9424 ], [ 120.355837, 30.928981 ], [ 120.361965, 30.928981 ], [ 120.355837, 30.920036 ], [ 120.355837, 30.884255 ], [ 120.429375, 30.915563 ], [ 120.435503, 30.861891 ], [ 120.435503, 30.857418 ], [ 120.44776, 30.848473 ], [ 120.472273, 30.790328 ], [ 120.472273, 30.785855 ], [ 120.472273, 30.781383 ], [ 120.478401, 30.781383 ], [ 120.502913, 30.759019 ], [ 120.558067, 30.839528 ], [ 120.58258, 30.857418 ], [ 120.588708, 30.857418 ], [ 120.588708, 30.852946 ], [ 120.656118, 30.861891 ], [ 120.680631, 30.884255 ], [ 120.711272, 30.888727 ], [ 120.680631, 30.96029 ], [ 120.680631, 30.964763 ], [ 120.686759, 30.964763 ], [ 120.686759, 30.969236 ], [ 120.766425, 30.996072 ], [ 120.858348, 30.991599 ], [ 120.864476, 30.991599 ], [ 120.882861, 31.005017 ], [ 120.888989, 31.018435 ], [ 120.895117, 31.018435 ], [ 120.870605, 31.098944 ], [ 120.876733, 31.139198 ], [ 121.023809, 31.143671 ], [ 121.042194, 31.152616 ], [ 121.060578, 31.152616 ], [ 121.072835, 31.166034 ], [ 121.066707, 31.183925 ], [ 121.066707, 31.188398 ], [ 121.066707, 31.197343 ], [ 121.05445, 31.246543 ], [ 121.05445, 31.251015 ], [ 121.060578, 31.268906 ], [ 121.097347, 31.277852 ], [ 121.103476, 31.277852 ], [ 121.146373, 31.295742 ], [ 121.146373, 31.300215 ], [ 121.140245, 31.309161 ], [ 121.127988, 31.304688 ], [ 121.12186, 31.304688 ], [ 121.12186, 31.309161 ], [ 121.127988, 31.335997 ], [ 121.127988, 31.340469 ], [ 121.109604, 31.371778 ], [ 121.146373, 31.389669 ], [ 121.140245, 31.389669 ], [ 121.146373, 31.398614 ], [ 121.152501, 31.429923 ], [ 121.232167, 31.492541 ], [ 121.238296, 31.483596 ], [ 121.244424, 31.483596 ], [ 121.250552, 31.483596 ], [ 121.250552, 31.479123 ], [ 121.262808, 31.488068 ], [ 121.268937, 31.488068 ], [ 121.275065, 31.488068 ], [ 121.275065, 31.492541 ], [ 121.293449, 31.501486 ], [ 121.299578, 31.505959 ], [ 121.311834, 31.505959 ], [ 121.317962, 31.505959 ], [ 121.379244, 31.546213 ], [ 121.281193, 31.631195 ], [ 121.097347, 31.765375 ], [ 121.281193, 31.877193 ], [ 121.348603, 31.854829 ], [ 121.446654, 31.760903 ], [ 121.722422, 31.666976 ], [ 121.734679, 31.64014 ], [ 121.814345, 31.635667 ], [ 122.071729, 31.653558 ], [ 122.384266, 31.698285 ], [ 121.863371, 33.075875 ], [ 121.83273, 33.129547 ], [ 121.538577, 33.478417 ], [ 120.588708, 35.370367 ], [ 119.583686, 35.039388 ], [ 119.301789, 35.079642 ], [ 119.283405, 35.110951 ], [ 119.258892, 35.119896 ], [ 119.246636, 35.124369 ], [ 119.240507, 35.124369 ], [ 119.228251, 35.119896 ], [ 119.203738, 35.110951 ], [ 119.117944, 35.075169 ], [ 119.117944, 35.070697 ], [ 119.105687, 35.052806 ], [ 118.915714, 35.048333 ], [ 118.854432, 35.021497 ], [ 118.854432, 34.940988 ], [ 118.799278, 34.878371 ], [ 118.799278, 34.873898 ], [ 118.799278, 34.869425 ], [ 118.79315, 34.847062 ], [ 118.79315, 34.842589 ], [ 118.713483, 34.753135 ], [ 118.768637, 34.735244 ], [ 118.682843, 34.681572 ], [ 118.52351, 34.712881 ], [ 118.468356, 34.623427 ], [ 118.413202, 34.596591 ], [ 118.431587, 34.520555 ], [ 118.400946, 34.440047 ], [ 118.364177, 34.417683 ], [ 118.284511, 34.426629 ], [ 118.168075, 34.386374 ], [ 118.174203, 34.453465 ], [ 118.125178, 34.484774 ], [ 118.168075, 34.551864 ], [ 118.131306, 34.560809 ], [ 118.070024, 34.569755 ], [ 118.112921, 34.614482 ], [ 118.088409, 34.654736 ], [ 117.953589, 34.681572 ], [ 117.898435, 34.645791 ], [ 117.788128, 34.654736 ], [ 117.794256, 34.520555 ], [ 117.690077, 34.547391 ], [ 117.653307, 34.502664 ], [ 117.561385, 34.466883 ], [ 117.481718, 34.480301 ], [ 117.395924, 34.538446 ], [ 117.402052, 34.574227 ], [ 117.322385, 34.574227 ], [ 117.322385, 34.569755 ], [ 117.304001, 34.560809 ], [ 117.242719, 34.466883 ] ], [ [ 119.056662, 32.481006 ], [ 119.050534, 32.476534 ], [ 119.050534, 32.481006 ], [ 119.056662, 32.481006 ] ] ], [ [ [ 119.638839, 31.139198 ], [ 119.638839, 31.134725 ], [ 119.644968, 31.139198 ], [ 119.638839, 31.139198 ] ] ] ] }, \"iso_3166_2\" : \"CN-JS\", \"division_code\" : \"32\", \"label_en\" : \"Jiangsu\", \"label_zh\" : \"æ±\u009Fè\u008B\u008Fç\u009C\u0081\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"rYl7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 118.039383, 29.211467 ], [ 118.020999, 29.16674 ], [ 118.045511, 29.11754 ], [ 118.045511, 29.113068 ], [ 118.057768, 29.086231 ], [ 118.063896, 29.045977 ], [ 118.08228, 29.010196 ], [ 118.088409, 29.010196 ], [ 118.100665, 29.010196 ], [ 118.106793, 29.005723 ], [ 118.106793, 29.010196 ], [ 118.125178, 28.987832 ], [ 118.131306, 28.987832 ], [ 118.143562, 28.983359 ], [ 118.14969, 28.987832 ], [ 118.223229, 28.943105 ], [ 118.18646, 28.911796 ], [ 118.259998, 28.920742 ], [ 118.272254, 28.907324 ], [ 118.296767, 28.844706 ], [ 118.296767, 28.831288 ], [ 118.309023, 28.822342 ], [ 118.315151, 28.822342 ], [ 118.370305, 28.804452 ], [ 118.376433, 28.76867 ], [ 118.38869, 28.759725 ], [ 118.38869, 28.755252 ], [ 118.394818, 28.741834 ], [ 118.394818, 28.737361 ], [ 118.38869, 28.732889 ], [ 118.394818, 28.732889 ], [ 118.394818, 28.728416 ], [ 118.38869, 28.723943 ], [ 118.394818, 28.723943 ], [ 118.394818, 28.71947 ], [ 118.38869, 28.706052 ], [ 118.413202, 28.683689 ], [ 118.419331, 28.683689 ], [ 118.425459, 28.656853 ], [ 118.425459, 28.65238 ], [ 118.419331, 28.65238 ], [ 118.419331, 28.647907 ], [ 118.425459, 28.630017 ], [ 118.425459, 28.621071 ], [ 118.419331, 28.621071 ], [ 118.419331, 28.616598 ], [ 118.419331, 28.612126 ], [ 118.413202, 28.612126 ], [ 118.413202, 28.598708 ], [ 118.413202, 28.58529 ], [ 118.407074, 28.571872 ], [ 118.407074, 28.567399 ], [ 118.407074, 28.558453 ], [ 118.413202, 28.558453 ], [ 118.413202, 28.553981 ], [ 118.419331, 28.549508 ], [ 118.419331, 28.540563 ], [ 118.425459, 28.53609 ], [ 118.419331, 28.53609 ], [ 118.419331, 28.527145 ], [ 118.425459, 28.527145 ], [ 118.425459, 28.522672 ], [ 118.425459, 28.518199 ], [ 118.431587, 28.522672 ], [ 118.431587, 28.509254 ], [ 118.425459, 28.504781 ], [ 118.419331, 28.504781 ], [ 118.413202, 28.504781 ], [ 118.425459, 28.495836 ], [ 118.431587, 28.495836 ], [ 118.437715, 28.495836 ], [ 118.437715, 28.491363 ], [ 118.443843, 28.482418 ], [ 118.449972, 28.482418 ], [ 118.4561, 28.482418 ], [ 118.462228, 28.482418 ], [ 118.468356, 28.482418 ], [ 118.468356, 28.477945 ], [ 118.474484, 28.477945 ], [ 118.474484, 28.473472 ], [ 118.462228, 28.464527 ], [ 118.462228, 28.460054 ], [ 118.462228, 28.455581 ], [ 118.449972, 28.424273 ], [ 118.443843, 28.4198 ], [ 118.431587, 28.410855 ], [ 118.431587, 28.406382 ], [ 118.431587, 28.401909 ], [ 118.4561, 28.3706 ], [ 118.468356, 28.348237 ], [ 118.468356, 28.339291 ], [ 118.474484, 28.339291 ], [ 118.474484, 28.334819 ], [ 118.468356, 28.334819 ], [ 118.468356, 28.330346 ], [ 118.474484, 28.330346 ], [ 118.474484, 28.325873 ], [ 118.474484, 28.321401 ], [ 118.431587, 28.290092 ], [ 118.443843, 28.258783 ], [ 118.437715, 28.25431 ], [ 118.4561, 28.249838 ], [ 118.4561, 28.245365 ], [ 118.498997, 28.25431 ], [ 118.492869, 28.258783 ], [ 118.498997, 28.258783 ], [ 118.492869, 28.263256 ], [ 118.492869, 28.276674 ], [ 118.511253, 28.281146 ], [ 118.517382, 28.276674 ], [ 118.541894, 28.272201 ], [ 118.566407, 28.290092 ], [ 118.572535, 28.290092 ], [ 118.603176, 28.267728 ], [ 118.609304, 28.263256 ], [ 118.621561, 28.263256 ], [ 118.627689, 28.267728 ], [ 118.65833, 28.276674 ], [ 118.65833, 28.272201 ], [ 118.707355, 28.316928 ], [ 118.713483, 28.316928 ], [ 118.719612, 28.285619 ], [ 118.72574, 28.285619 ], [ 118.731868, 28.263256 ], [ 118.731868, 28.258783 ], [ 118.762509, 28.240892 ], [ 118.805406, 28.231947 ], [ 118.79315, 28.209583 ], [ 118.787022, 28.173802 ], [ 118.799278, 28.120129 ], [ 118.719612, 28.07093 ], [ 118.72574, 28.039621 ], [ 118.72574, 28.035148 ], [ 118.72574, 28.030675 ], [ 118.72574, 27.97253 ], [ 118.79315, 27.936749 ], [ 118.79315, 27.932276 ], [ 118.799278, 27.927804 ], [ 118.799278, 27.923331 ], [ 118.799278, 27.918858 ], [ 118.805406, 27.918858 ], [ 118.817663, 27.900967 ], [ 118.829919, 27.83835 ], [ 118.842175, 27.793623 ], [ 118.848304, 27.775732 ], [ 118.885073, 27.708641 ], [ 118.903457, 27.628133 ], [ 118.903457, 27.62366 ], [ 118.909585, 27.614715 ], [ 118.897329, 27.569988 ], [ 118.891201, 27.574461 ], [ 118.891201, 27.569988 ], [ 118.885073, 27.547624 ], [ 118.878944, 27.547624 ], [ 118.872816, 27.543152 ], [ 118.866688, 27.543152 ], [ 118.897329, 27.467116 ], [ 118.940226, 27.462643 ], [ 118.940226, 27.458171 ], [ 118.983124, 27.480534 ], [ 118.983124, 27.489479 ], [ 119.050534, 27.471589 ], [ 119.111815, 27.489479 ], [ 119.117944, 27.44028 ], [ 119.240507, 27.422389 ], [ 119.338558, 27.511843 ], [ 119.338558, 27.516316 ], [ 119.363071, 27.529734 ], [ 119.430481, 27.511843 ], [ 119.485635, 27.578933 ], [ 119.485635, 27.583406 ], [ 119.485635, 27.587879 ], [ 119.485635, 27.592351 ], [ 119.485635, 27.601297 ], [ 119.497891, 27.650496 ], [ 119.504019, 27.654969 ], [ 119.546917, 27.668387 ], [ 119.632711, 27.67286 ], [ 119.626583, 27.601297 ], [ 119.675609, 27.574461 ], [ 119.657224, 27.538679 ], [ 119.663352, 27.538679 ], [ 119.687865, 27.538679 ], [ 119.681737, 27.444753 ], [ 119.767531, 27.332935 ], [ 119.767531, 27.328462 ], [ 119.810429, 27.301626 ], [ 119.87171, 27.310572 ], [ 119.902351, 27.319517 ], [ 119.914608, 27.319517 ], [ 119.932992, 27.328462 ], [ 119.932992, 27.337408 ], [ 119.932992, 27.341881 ], [ 119.951377, 27.364244 ], [ 120.000402, 27.373189 ], [ 120.049428, 27.350826 ], [ 120.098453, 27.400026 ], [ 120.104581, 27.400026 ], [ 120.116838, 27.400026 ], [ 120.122966, 27.400026 ], [ 120.141351, 27.426862 ], [ 120.17812, 27.422389 ], [ 120.17812, 27.426862 ], [ 120.24553, 27.44028 ], [ 120.263914, 27.422389 ], [ 120.257786, 27.422389 ], [ 120.31294, 27.404498 ], [ 120.319068, 27.404498 ], [ 120.343581, 27.39108 ], [ 120.343581, 27.377662 ], [ 120.343581, 27.346353 ], [ 120.417119, 27.256899 ], [ 120.410991, 27.256899 ], [ 120.410991, 27.261372 ], [ 120.404863, 27.22559 ], [ 120.404863, 27.221118 ], [ 120.398734, 27.22559 ], [ 120.398734, 27.221118 ], [ 120.398734, 27.216645 ], [ 120.398734, 27.212172 ], [ 120.404863, 27.2077 ], [ 120.398734, 27.2077 ], [ 120.417119, 27.185336 ], [ 120.417119, 27.180864 ], [ 120.502913, 27.104828 ], [ 120.600964, 27.055628 ], [ 120.748041, 27.033265 ], [ 120.895117, 26.934865 ], [ 121.036066, 26.85883 ], [ 121.32409, 27.359771 ], [ 122.090113, 28.272201 ], [ 122.108498, 28.290092 ], [ 122.482317, 28.804452 ], [ 123.156418, 30.083642 ], [ 123.38316, 30.66062 ], [ 123.395417, 30.732183 ], [ 123.334135, 30.866364 ], [ 122.16978, 30.911091 ], [ 122.077857, 30.844 ], [ 121.918524, 30.767964 ], [ 121.624371, 30.678511 ], [ 121.532449, 30.66062 ], [ 121.275065, 30.678511 ], [ 121.268937, 30.700874 ], [ 121.262808, 30.705347 ], [ 121.268937, 30.72771 ], [ 121.262808, 30.72771 ], [ 121.262808, 30.732183 ], [ 121.262808, 30.736656 ], [ 121.226039, 30.772437 ], [ 121.219911, 30.77691 ], [ 121.219911, 30.781383 ], [ 121.207655, 30.790328 ], [ 121.170886, 30.77691 ], [ 121.164757, 30.77691 ], [ 121.134117, 30.781383 ], [ 121.134117, 30.830582 ], [ 121.127988, 30.835055 ], [ 121.127988, 30.839528 ], [ 121.115732, 30.839528 ], [ 121.115732, 30.848473 ], [ 121.109604, 30.852946 ], [ 121.042194, 30.830582 ], [ 121.005425, 30.839528 ], [ 121.005425, 30.835055 ], [ 120.993168, 30.844 ], [ 120.999296, 30.852946 ], [ 121.005425, 30.852946 ], [ 121.005425, 30.857418 ], [ 121.011553, 30.861891 ], [ 120.993168, 30.937927 ], [ 120.993168, 30.9424 ], [ 120.98704, 30.964763 ], [ 120.98704, 31.018435 ], [ 120.895117, 31.018435 ], [ 120.888989, 31.018435 ], [ 120.882861, 31.005017 ], [ 120.864476, 30.991599 ], [ 120.858348, 30.991599 ], [ 120.766425, 30.996072 ], [ 120.686759, 30.969236 ], [ 120.686759, 30.964763 ], [ 120.680631, 30.964763 ], [ 120.680631, 30.96029 ], [ 120.711272, 30.888727 ], [ 120.680631, 30.884255 ], [ 120.656118, 30.861891 ], [ 120.588708, 30.852946 ], [ 120.588708, 30.857418 ], [ 120.58258, 30.857418 ], [ 120.558067, 30.839528 ], [ 120.502913, 30.759019 ], [ 120.478401, 30.781383 ], [ 120.472273, 30.781383 ], [ 120.472273, 30.785855 ], [ 120.472273, 30.790328 ], [ 120.44776, 30.848473 ], [ 120.435503, 30.857418 ], [ 120.435503, 30.861891 ], [ 120.429375, 30.915563 ], [ 120.355837, 30.884255 ], [ 120.355837, 30.920036 ], [ 120.361965, 30.928981 ], [ 120.355837, 30.928981 ], [ 120.368093, 30.9424 ], [ 120.368093, 30.946872 ], [ 120.270042, 30.928981 ], [ 120.122966, 30.946872 ], [ 119.988146, 31.036326 ], [ 119.914608, 31.170507 ], [ 119.877839, 31.166034 ], [ 119.853326, 31.170507 ], [ 119.822685, 31.17498 ], [ 119.816557, 31.170507 ], [ 119.816557, 31.166034 ], [ 119.822685, 31.157089 ], [ 119.816557, 31.157089 ], [ 119.773659, 31.179452 ], [ 119.761403, 31.179452 ], [ 119.755275, 31.17498 ], [ 119.749147, 31.17498 ], [ 119.706249, 31.161562 ], [ 119.66948, 31.166034 ], [ 119.657224, 31.161562 ], [ 119.657224, 31.157089 ], [ 119.638839, 31.152616 ], [ 119.638839, 31.148144 ], [ 119.638839, 31.139198 ], [ 119.632711, 31.134725 ], [ 119.620455, 31.130253 ], [ 119.614327, 31.130253 ], [ 119.614327, 31.12578 ], [ 119.620455, 31.116835 ], [ 119.620455, 31.112362 ], [ 119.626583, 31.112362 ], [ 119.626583, 31.116835 ], [ 119.632711, 31.116835 ], [ 119.632711, 31.107889 ], [ 119.638839, 31.103417 ], [ 119.626583, 31.05869 ], [ 119.626583, 31.040799 ], [ 119.626583, 31.036326 ], [ 119.577558, 30.955818 ], [ 119.583686, 30.955818 ], [ 119.577558, 30.937927 ], [ 119.577558, 30.933454 ], [ 119.577558, 30.928981 ], [ 119.571429, 30.924509 ], [ 119.559173, 30.911091 ], [ 119.553045, 30.884255 ], [ 119.571429, 30.844 ], [ 119.522404, 30.77691 ], [ 119.473378, 30.77691 ], [ 119.46725, 30.696401 ], [ 119.461122, 30.682983 ], [ 119.454994, 30.682983 ], [ 119.430481, 30.651674 ], [ 119.430481, 30.647202 ], [ 119.393712, 30.66062 ], [ 119.387584, 30.682983 ], [ 119.381456, 30.691929 ], [ 119.381456, 30.687456 ], [ 119.277276, 30.615893 ], [ 119.277276, 30.620366 ], [ 119.252764, 30.593529 ], [ 119.258892, 30.575639 ], [ 119.240507, 30.562221 ], [ 119.240507, 30.557748 ], [ 119.240507, 30.553275 ], [ 119.234379, 30.553275 ], [ 119.252764, 30.530912 ], [ 119.258892, 30.521966 ], [ 119.326302, 30.526439 ], [ 119.326302, 30.521966 ], [ 119.326302, 30.490657 ], [ 119.326302, 30.486185 ], [ 119.33243, 30.468294 ], [ 119.375327, 30.356477 ], [ 119.33243, 30.365422 ], [ 119.33243, 30.369895 ], [ 119.301789, 30.365422 ], [ 119.240507, 30.32964 ], [ 119.240507, 30.325168 ], [ 119.240507, 30.31175 ], [ 119.222123, 30.293859 ], [ 119.032149, 30.316222 ], [ 119.019893, 30.32964 ], [ 118.952483, 30.360949 ], [ 118.915714, 30.338586 ], [ 118.915714, 30.334113 ], [ 118.909585, 30.334113 ], [ 118.878944, 30.316222 ], [ 118.891201, 30.258077 ], [ 118.885073, 30.258077 ], [ 118.897329, 30.222296 ], [ 118.915714, 30.217823 ], [ 118.915714, 30.21335 ], [ 118.842175, 30.164151 ], [ 118.891201, 30.14626 ], [ 118.854432, 30.123896 ], [ 118.885073, 30.056806 ], [ 118.885073, 30.047861 ], [ 118.885073, 29.958407 ], [ 118.885073, 29.940516 ], [ 118.848304, 29.940516 ], [ 118.836047, 29.922625 ], [ 118.842175, 29.895789 ], [ 118.836047, 29.895789 ], [ 118.756381, 29.824226 ], [ 118.731868, 29.788444 ], [ 118.744124, 29.74819 ], [ 118.639945, 29.645318 ], [ 118.566407, 29.6319 ], [ 118.517382, 29.591646 ], [ 118.517382, 29.587173 ], [ 118.486741, 29.529028 ], [ 118.437715, 29.51561 ], [ 118.425459, 29.506665 ], [ 118.425459, 29.502192 ], [ 118.413202, 29.511137 ], [ 118.358049, 29.488774 ], [ 118.358049, 29.484301 ], [ 118.351921, 29.484301 ], [ 118.315151, 29.502192 ], [ 118.315151, 29.497719 ], [ 118.302895, 29.493247 ], [ 118.309023, 29.426156 ], [ 118.25387, 29.430629 ], [ 118.18646, 29.39932 ], [ 118.180331, 29.33223 ], [ 118.161947, 29.287503 ], [ 118.143562, 29.287503 ], [ 118.137434, 29.287503 ], [ 118.08228, 29.287503 ], [ 118.08228, 29.291975 ], [ 118.076152, 29.274085 ], [ 118.070024, 29.274085 ], [ 118.076152, 29.220412 ], [ 118.039383, 29.211467 ] ], [ [ 119.638839, 31.139198 ], [ 119.644968, 31.139198 ], [ 119.638839, 31.134725 ], [ 119.638839, 31.139198 ] ] ] }, \"iso_3166_2\" : \"CN-ZJ\", \"division_code\" : \"33\", \"label_en\" : \"Zhejiang\", \"label_zh\" : \"æµ\u0099æ±\u009Fç\u009C\u0081\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"rol7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 79.039614, 34.332702 ], [ 78.978332, 34.314811 ], [ 78.959948, 34.234303 ], [ 78.910922, 34.140376 ], [ 78.861897, 34.167212 ], [ 78.837384, 34.126958 ], [ 78.788358, 34.135903 ], [ 78.745461, 34.091176 ], [ 78.659666, 34.086704 ], [ 78.653538, 34.033031 ], [ 78.739333, 34.006195 ], [ 78.733205, 33.925687 ], [ 78.776102, 33.737834 ], [ 78.678051, 33.66627 ], [ 78.71482, 33.621544 ], [ 78.757717, 33.626016 ], [ 78.733205, 33.563399 ], [ 78.84964, 33.4158 ], [ 78.892537, 33.4158 ], [ 78.978332, 33.326346 ], [ 79.027358, 33.321873 ], [ 79.045742, 33.259255 ], [ 79.162178, 33.174274 ], [ 79.137665, 33.107184 ], [ 79.174434, 32.986421 ], [ 79.284741, 32.955112 ], [ 79.303126, 32.883549 ], [ 79.413433, 32.776204 ], [ 79.462459, 32.709114 ], [ 79.401177, 32.61966 ], [ 79.413433, 32.521261 ], [ 79.352151, 32.525733 ], [ 79.333767, 32.565988 ], [ 79.2541, 32.521261 ], [ 79.131537, 32.481006 ], [ 79.100896, 32.369189 ], [ 79.008973, 32.382607 ], [ 78.959948, 32.33788 ], [ 78.806743, 32.43628 ], [ 78.757717, 32.561515 ], [ 78.78223, 32.615187 ], [ 78.739333, 32.655442 ], [ 78.751589, 32.691223 ], [ 78.659666, 32.659914 ], [ 78.629026, 32.601769 ], [ 78.561615, 32.624133 ], [ 78.500334, 32.583878 ], [ 78.420667, 32.57046 ], [ 78.390026, 32.534679 ], [ 78.469693, 32.445225 ], [ 78.457436, 32.378134 ], [ 78.494205, 32.279735 ], [ 78.598385, 32.1545 ], [ 78.684179, 32.114246 ], [ 78.684179, 32.073991 ], [ 78.733205, 32.002428 ], [ 78.769974, 32.002428 ], [ 78.769974, 31.926392 ], [ 78.733205, 31.832466 ], [ 78.702564, 31.810102 ], [ 78.751589, 31.675921 ], [ 78.800615, 31.680394 ], [ 78.843512, 31.595413 ], [ 78.720948, 31.492541 ], [ 78.794487, 31.434396 ], [ 78.751589, 31.362833 ], [ 78.788358, 31.304688 ], [ 78.898666, 31.286797 ], [ 78.941563, 31.367306 ], [ 79.021229, 31.349415 ], [ 79.015101, 31.425451 ], [ 79.070255, 31.456759 ], [ 79.143793, 31.434396 ], [ 79.168306, 31.362833 ], [ 79.211203, 31.353887 ], [ 79.247972, 31.295742 ], [ 79.229588, 31.259961 ], [ 79.303126, 31.219707 ], [ 79.309254, 31.148144 ], [ 79.401177, 31.116835 ], [ 79.42569, 31.022908 ], [ 79.505356, 31.031853 ], [ 79.548253, 30.96029 ], [ 79.597279, 30.937927 ], [ 79.738227, 30.978181 ], [ 79.756612, 31.005017 ], [ 79.866919, 30.973708 ], [ 79.885303, 30.920036 ], [ 80.056893, 30.839528 ], [ 80.105918, 30.781383 ], [ 80.179456, 30.808219 ], [ 80.240738, 30.763492 ], [ 80.246866, 30.714292 ], [ 80.197841, 30.687456 ], [ 80.210097, 30.584584 ], [ 80.314276, 30.566693 ], [ 80.338789, 30.521966 ], [ 80.418456, 30.521966 ], [ 80.553276, 30.450403 ], [ 80.608429, 30.472767 ], [ 80.70648, 30.419094 ], [ 80.822916, 30.316222 ], [ 80.90871, 30.302804 ], [ 80.927095, 30.267023 ], [ 81.031274, 30.249132 ], [ 81.04353, 30.177569 ], [ 81.0803, 30.155205 ], [ 81.092556, 30.052333 ], [ 81.123197, 30.021025 ], [ 81.251889, 30.016552 ], [ 81.288658, 30.070224 ], [ 81.264145, 30.155205 ], [ 81.319299, 30.150733 ], [ 81.392837, 30.208878 ], [ 81.423478, 30.302804 ], [ 81.398965, 30.396731 ], [ 81.435734, 30.419094 ], [ 81.48476, 30.383313 ], [ 81.55217, 30.374367 ], [ 81.558298, 30.423567 ], [ 81.61958, 30.44593 ], [ 81.748272, 30.387785 ], [ 81.944374, 30.356477 ], [ 81.987271, 30.320695 ], [ 82.085322, 30.360949 ], [ 82.122091, 30.325168 ], [ 82.097578, 30.240187 ], [ 82.207886, 30.155205 ], [ 82.171116, 30.123896 ], [ 82.171116, 30.065751 ], [ 82.250783, 30.074697 ], [ 82.336577, 30.047861 ], [ 82.36109, 30.007606 ], [ 82.397859, 30.025497 ], [ 82.502038, 29.944989 ], [ 82.56332, 29.953934 ], [ 82.624602, 29.837644 ], [ 82.69814, 29.855535 ], [ 82.734909, 29.810808 ], [ 82.692012, 29.761608 ], [ 82.747166, 29.770554 ], [ 82.826832, 29.690045 ], [ 82.93714, 29.703463 ], [ 82.943268, 29.672154 ], [ 83.010678, 29.663209 ], [ 83.084216, 29.605064 ], [ 83.114857, 29.627427 ], [ 83.157754, 29.596119 ], [ 83.219036, 29.605064 ], [ 83.261933, 29.578228 ], [ 83.268062, 29.506665 ], [ 83.347728, 29.493247 ], [ 83.378369, 29.421683 ], [ 83.415138, 29.421683 ], [ 83.439651, 29.305393 ], [ 83.519317, 29.247248 ], [ 83.519317, 29.21594 ], [ 83.635753, 29.157794 ], [ 83.709291, 29.242776 ], [ 83.795085, 29.247248 ], [ 83.81347, 29.300921 ], [ 83.978931, 29.327757 ], [ 84.119879, 29.278557 ], [ 84.113751, 29.242776 ], [ 84.199546, 29.242776 ], [ 84.162777, 29.193576 ], [ 84.199546, 29.126486 ], [ 84.187289, 29.045977 ], [ 84.248571, 29.041504 ], [ 84.224058, 28.893906 ], [ 84.377263, 28.867069 ], [ 84.432417, 28.822342 ], [ 84.438545, 28.76867 ], [ 84.493699, 28.737361 ], [ 84.628519, 28.737361 ], [ 84.720441, 28.621071 ], [ 84.855261, 28.571872 ], [ 84.983953, 28.607653 ], [ 85.051363, 28.679216 ], [ 85.112645, 28.688162 ], [ 85.19844, 28.630017 ], [ 85.173927, 28.589762 ], [ 85.186183, 28.531617 ], [ 85.100389, 28.446636 ], [ 85.124902, 28.397436 ], [ 85.106517, 28.348237 ], [ 85.247465, 28.299037 ], [ 85.345516, 28.30351 ], [ 85.376157, 28.276674 ], [ 85.431311, 28.334819 ], [ 85.510977, 28.334819 ], [ 85.596772, 28.307983 ], [ 85.639669, 28.272201 ], [ 85.682566, 28.384018 ], [ 85.713207, 28.384018 ], [ 85.73772, 28.276674 ], [ 85.774489, 28.209583 ], [ 85.848027, 28.182747 ], [ 85.897053, 28.053039 ], [ 85.976719, 27.999367 ], [ 85.946078, 27.941222 ], [ 86.068642, 27.900967 ], [ 86.123796, 27.927804 ], [ 86.080898, 28.012785 ], [ 86.087027, 28.088821 ], [ 86.178949, 28.142493 ], [ 86.221847, 27.985949 ], [ 86.338282, 27.963585 ], [ 86.405692, 27.909913 ], [ 86.442461, 27.909913 ], [ 86.516, 27.968058 ], [ 86.565025, 28.111184 ], [ 86.632435, 28.07093 ], [ 86.663076, 28.102239 ], [ 86.748871, 28.097766 ], [ 86.754999, 28.035148 ], [ 86.865306, 28.026203 ], [ 86.951101, 27.95464 ], [ 87.043024, 27.950167 ], [ 87.110434, 27.842822 ], [ 87.214613, 27.820459 ], [ 87.25751, 27.851768 ], [ 87.32492, 27.829404 ], [ 87.422971, 27.860713 ], [ 87.447484, 27.820459 ], [ 87.490381, 27.847295 ], [ 87.582304, 27.860713 ], [ 87.588432, 27.820459 ], [ 87.668098, 27.833877 ], [ 87.735508, 27.807041 ], [ 87.778406, 27.892022 ], [ 87.858072, 27.950167 ], [ 87.8642, 27.909913 ], [ 87.956123, 27.909913 ], [ 87.974508, 27.887549 ], [ 88.048046, 27.900967 ], [ 88.090943, 27.869658 ], [ 88.139969, 27.963585 ], [ 88.250276, 27.941222 ], [ 88.336071, 27.985949 ], [ 88.415737, 27.981476 ], [ 88.501532, 28.053039 ], [ 88.550557, 28.035148 ], [ 88.556685, 28.084348 ], [ 88.636352, 28.124602 ], [ 88.666993, 28.075402 ], [ 88.746659, 28.075402 ], [ 88.838582, 28.017257 ], [ 88.832454, 27.932276 ], [ 88.881479, 27.896495 ], [ 88.856966, 27.815986 ], [ 88.850838, 27.668387 ], [ 88.807941, 27.596824 ], [ 88.765043, 27.569988 ], [ 88.789556, 27.525261 ], [ 88.783428, 27.453698 ], [ 88.832454, 27.382135 ], [ 88.893735, 27.332935 ], [ 89.004043, 27.32399 ], [ 88.967274, 27.400026 ], [ 88.97953, 27.489479 ], [ 89.034684, 27.543152 ], [ 89.034684, 27.583406 ], [ 89.108222, 27.60577 ], [ 89.218529, 27.72206 ], [ 89.224657, 27.784677 ], [ 89.292067, 27.851768 ], [ 89.390118, 27.887549 ], [ 89.4514, 27.97253 ], [ 89.457528, 28.030675 ], [ 89.537195, 28.084348 ], [ 89.598477, 28.164856 ], [ 89.727169, 28.173802 ], [ 89.782322, 28.200638 ], [ 89.794579, 28.245365 ], [ 89.868117, 28.223001 ], [ 89.898758, 28.182747 ], [ 89.978424, 28.191692 ], [ 90.033578, 28.13802 ], [ 90.16227, 28.191692 ], [ 90.211295, 28.146966 ], [ 90.290962, 28.164856 ], [ 90.3645, 28.097766 ], [ 90.370628, 28.066457 ], [ 90.505448, 28.061984 ], [ 90.578986, 28.026203 ], [ 90.689294, 28.079875 ], [ 90.775088, 28.044094 ], [ 90.922165, 28.039621 ], [ 90.97119, 28.003839 ], [ 91.020216, 28.02173 ], [ 91.063113, 27.994894 ], [ 91.216317, 27.990421 ], [ 91.246958, 28.066457 ], [ 91.345009, 28.061984 ], [ 91.485958, 27.977003 ], [ 91.485958, 27.941222 ], [ 91.620778, 27.896495 ], [ 91.620778, 27.865186 ], [ 91.553368, 27.85624 ], [ 91.541111, 27.824932 ], [ 91.620778, 27.83835 ], [ 91.700444, 27.793623 ], [ 91.786239, 27.771259 ], [ 91.835264, 27.784677 ], [ 91.872033, 27.72206 ], [ 91.921059, 27.717587 ], [ 91.994597, 27.784677 ], [ 92.01911, 27.775732 ], [ 92.166186, 27.829404 ], [ 92.239724, 27.887549 ], [ 92.294878, 27.869658 ], [ 92.319391, 27.798095 ], [ 92.42357, 27.833877 ], [ 92.460339, 27.802568 ], [ 92.503236, 27.851768 ], [ 92.638056, 27.909913 ], [ 92.729979, 27.977003 ], [ 92.736107, 28.039621 ], [ 92.668697, 28.066457 ], [ 92.674825, 28.151438 ], [ 92.785133, 28.18722 ], [ 92.834158, 28.173802 ], [ 92.938337, 28.218529 ], [ 92.932209, 28.249838 ], [ 93.054773, 28.30351 ], [ 93.146696, 28.366128 ], [ 93.183465, 28.495836 ], [ 93.306029, 28.594235 ], [ 93.446977, 28.670271 ], [ 93.624694, 28.688162 ], [ 93.636951, 28.65238 ], [ 93.716617, 28.665798 ], [ 93.784027, 28.728416 ], [ 93.900462, 28.755252 ], [ 93.974001, 28.822342 ], [ 94.023026, 28.795506 ], [ 94.023026, 28.849179 ], [ 94.163974, 28.902851 ], [ 94.176231, 28.93416 ], [ 94.262025, 28.929687 ], [ 94.274282, 28.969941 ], [ 94.34782, 29.005723 ], [ 94.274282, 29.095177 ], [ 94.292666, 29.153322 ], [ 94.378461, 29.153322 ], [ 94.458127, 29.211467 ], [ 94.543922, 29.220412 ], [ 94.623588, 29.296448 ], [ 94.690998, 29.318811 ], [ 94.733896, 29.287503 ], [ 94.75228, 29.229358 ], [ 94.801306, 29.211467 ], [ 94.801306, 29.16674 ], [ 94.850331, 29.184631 ], [ 94.911613, 29.157794 ], [ 94.997408, 29.171213 ], [ 95.08933, 29.144376 ], [ 95.101587, 29.099649 ], [ 95.230279, 29.104122 ], [ 95.273176, 29.072813 ], [ 95.303817, 29.139904 ], [ 95.401868, 29.122013 ], [ 95.432509, 29.193576 ], [ 95.457021, 29.135431 ], [ 95.512175, 29.126486 ], [ 95.499919, 29.193576 ], [ 95.604098, 29.189103 ], [ 95.604098, 29.23383 ], [ 95.653123, 29.211467 ], [ 95.73279, 29.229358 ], [ 95.738918, 29.300921 ], [ 95.818584, 29.35012 ], [ 95.873738, 29.314339 ], [ 95.965661, 29.376957 ], [ 96.045327, 29.381429 ], [ 96.143378, 29.336702 ], [ 96.180147, 29.269612 ], [ 96.259814, 29.247248 ], [ 96.302711, 29.184631 ], [ 96.180147, 29.113068 ], [ 96.20466, 29.023614 ], [ 96.278198, 29.099649 ], [ 96.345608, 29.099649 ], [ 96.363993, 29.037032 ], [ 96.437531, 29.005723 ], [ 96.455916, 28.93416 ], [ 96.511069, 28.947578 ], [ 96.517197, 28.867069 ], [ 96.602992, 28.777615 ], [ 96.621377, 28.728416 ], [ 96.535582, 28.679216 ], [ 96.535582, 28.65238 ], [ 96.449787, 28.580817 ], [ 96.480428, 28.567399 ], [ 96.40689, 28.509254 ], [ 96.511069, 28.460054 ], [ 96.535582, 28.571872 ], [ 96.60912, 28.612126 ], [ 96.74394, 28.571872 ], [ 96.768453, 28.513726 ], [ 96.860376, 28.48689 ], [ 96.884889, 28.392964 ], [ 96.989068, 28.325873 ], [ 97.08099, 28.3706 ], [ 97.148401, 28.352709 ], [ 97.240323, 28.294564 ], [ 97.283221, 28.231947 ], [ 97.344502, 28.214056 ], [ 97.411912, 28.249838 ], [ 97.424169, 28.294564 ], [ 97.516092, 28.334819 ], [ 97.485451, 28.388491 ], [ 97.503835, 28.464527 ], [ 97.558989, 28.540563 ], [ 97.614143, 28.518199 ], [ 97.663168, 28.540563 ], [ 97.736706, 28.469 ], [ 97.736706, 28.397436 ], [ 97.797988, 28.330346 ], [ 97.847014, 28.330346 ], [ 97.908295, 28.3706 ], [ 97.951193, 28.30351 ], [ 98.012475, 28.272201 ], [ 98.018603, 28.196165 ], [ 98.092141, 28.200638 ], [ 98.141166, 28.146966 ], [ 98.165679, 28.209583 ], [ 98.26373, 28.240892 ], [ 98.239217, 28.312455 ], [ 98.202448, 28.339291 ], [ 98.233089, 28.375073 ], [ 98.300499, 28.388491 ], [ 98.318884, 28.316928 ], [ 98.380166, 28.236419 ], [ 98.386294, 28.115657 ], [ 98.429191, 28.106711 ], [ 98.557883, 28.18722 ], [ 98.613037, 28.169329 ], [ 98.711088, 28.231947 ], [ 98.711088, 28.30351 ], [ 98.753985, 28.343764 ], [ 98.717216, 28.384018 ], [ 98.674319, 28.482418 ], [ 98.619165, 28.504781 ], [ 98.631421, 28.558453 ], [ 98.594652, 28.674743 ], [ 98.66819, 28.714998 ], [ 98.680447, 28.759725 ], [ 98.649806, 28.81787 ], [ 98.637549, 28.978887 ], [ 98.70496, 28.965469 ], [ 98.766241, 29.010196 ], [ 98.815267, 28.952051 ], [ 98.827523, 28.826815 ], [ 98.913318, 28.804452 ], [ 98.9746, 28.831288 ], [ 98.968471, 28.876015 ], [ 98.919446, 28.889433 ], [ 98.925574, 28.983359 ], [ 99.017497, 29.054923 ], [ 98.962343, 29.144376 ], [ 98.9746, 29.206994 ], [ 99.115548, 29.224885 ], [ 99.066522, 29.300921 ], [ 99.060394, 29.417211 ], [ 99.048138, 29.533501 ], [ 99.048138, 29.569282 ], [ 98.992984, 29.658736 ], [ 99.011369, 29.815281 ], [ 99.054266, 29.895789 ], [ 99.035882, 30.021025 ], [ 99.04201, 30.088115 ], [ 98.986856, 30.155205 ], [ 98.992984, 30.217823 ], [ 98.968471, 30.334113 ], [ 98.968471, 30.450403 ], [ 98.925574, 30.575639 ], [ 98.943959, 30.593529 ], [ 98.90719, 30.700874 ], [ 98.962343, 30.72771 ], [ 98.778498, 30.8932 ], [ 98.809139, 30.996072 ], [ 98.7356, 31.05869 ], [ 98.711088, 31.116835 ], [ 98.637549, 31.183925 ], [ 98.606909, 31.183925 ], [ 98.606909, 31.273379 ], [ 98.643678, 31.340469 ], [ 98.711088, 31.309161 ], [ 98.778498, 31.251015 ], [ 98.809139, 31.309161 ], [ 98.888805, 31.376251 ], [ 98.784626, 31.479123 ], [ 98.711088, 31.510432 ], [ 98.637549, 31.59094 ], [ 98.551755, 31.658031 ], [ 98.521114, 31.720648 ], [ 98.502729, 31.760903 ], [ 98.416935, 31.832466 ], [ 98.39855, 31.899556 ], [ 98.435319, 32.011374 ], [ 98.404678, 32.051628 ], [ 98.300499, 32.123191 ], [ 98.269858, 32.199227 ], [ 98.220833, 32.235008 ], [ 98.202448, 32.360244 ], [ 98.073756, 32.404971 ], [ 98.024731, 32.45417 ], [ 97.730578, 32.530206 ], [ 97.675424, 32.476534 ], [ 97.583502, 32.498897 ], [ 97.411912, 32.516788 ], [ 97.338374, 32.445225 ], [ 97.381272, 32.427334 ], [ 97.418041, 32.311044 ], [ 97.369015, 32.275263 ], [ 97.295477, 32.297626 ], [ 97.270964, 32.141082 ], [ 97.313862, 32.132136 ], [ 97.307733, 32.078464 ], [ 97.197426, 32.091882 ], [ 97.166785, 32.029264 ], [ 97.025837, 32.051628 ], [ 96.933914, 32.047155 ], [ 96.940042, 31.98901 ], [ 96.897145, 32.015846 ], [ 96.872632, 31.971119 ], [ 96.799094, 32.020319 ], [ 96.719428, 32.020319 ], [ 96.750069, 31.948756 ], [ 96.81135, 31.899556 ], [ 96.762325, 31.868247 ], [ 96.768453, 31.814575 ], [ 96.841991, 31.725121 ], [ 96.774581, 31.675921 ], [ 96.670402, 31.734066 ], [ 96.566223, 31.716176 ], [ 96.437531, 31.796684 ], [ 96.388506, 31.926392 ], [ 96.247557, 31.935338 ], [ 96.186275, 31.908502 ], [ 96.216916, 31.868247 ], [ 96.174019, 31.783266 ], [ 96.229173, 31.751957 ], [ 96.247557, 31.662503 ], [ 96.20466, 31.599886 ], [ 96.149506, 31.613304 ], [ 96.149506, 31.680394 ], [ 96.057584, 31.725121 ], [ 95.984045, 31.819048 ], [ 95.898251, 31.819048 ], [ 95.824713, 31.684867 ], [ 95.769559, 31.75643 ], [ 95.628611, 31.783266 ], [ 95.542816, 31.738539 ], [ 95.512175, 31.751957 ], [ 95.401868, 31.899556 ], [ 95.365099, 31.930865 ], [ 95.377355, 31.993483 ], [ 95.450893, 32.011374 ], [ 95.414124, 32.047155 ], [ 95.450893, 32.065046 ], [ 95.438637, 32.158972 ], [ 95.389611, 32.185809 ], [ 95.309945, 32.150027 ], [ 95.267048, 32.194754 ], [ 95.242535, 32.324462 ], [ 95.101587, 32.261844 ], [ 95.095459, 32.324462 ], [ 95.132228, 32.328935 ], [ 95.132228, 32.324462 ], [ 95.254791, 32.351298 ], [ 95.230279, 32.369189 ], [ 95.150612, 32.400498 ], [ 95.070946, 32.378134 ], [ 94.985151, 32.422861 ], [ 94.911613, 32.413916 ], [ 94.8871, 32.476534 ], [ 94.850331, 32.467588 ], [ 94.758408, 32.530206 ], [ 94.740024, 32.588351 ], [ 94.635845, 32.646496 ], [ 94.433615, 32.565988 ], [ 94.402974, 32.601769 ], [ 94.372333, 32.525733 ], [ 94.292666, 32.50337 ], [ 94.194615, 32.516788 ], [ 94.182359, 32.458643 ], [ 94.133334, 32.43628 ], [ 94.090436, 32.467588 ], [ 94.029154, 32.449698 ], [ 93.961744, 32.485479 ], [ 93.857565, 32.467588 ], [ 93.814668, 32.55257 ], [ 93.735001, 32.579406 ], [ 93.649207, 32.574933 ], [ 93.618566, 32.525733 ], [ 93.532771, 32.476534 ], [ 93.477618, 32.50337 ], [ 93.440849, 32.565988 ], [ 93.385695, 32.525733 ], [ 93.250875, 32.659914 ], [ 93.16508, 32.66886 ], [ 93.158952, 32.646496 ], [ 93.060901, 32.628605 ], [ 93.024132, 32.731477 ], [ 92.913825, 32.709114 ], [ 92.772876, 32.727005 ], [ 92.680954, 32.762786 ], [ 92.650313, 32.722532 ], [ 92.570646, 32.744895 ], [ 92.411314, 32.749368 ], [ 92.35616, 32.767259 ], [ 92.251981, 32.722532 ], [ 92.196827, 32.758314 ], [ 92.227468, 32.825404 ], [ 92.202955, 32.870131 ], [ 92.147802, 32.888022 ], [ 92.037494, 32.865658 ], [ 92.01911, 32.829877 ], [ 91.9517, 32.825404 ], [ 91.841392, 32.950639 ], [ 91.78011, 32.946167 ], [ 91.57788, 33.040093 ], [ 91.534983, 33.102711 ], [ 91.455317, 33.075875 ], [ 91.30824, 33.111656 ], [ 91.265343, 33.142965 ], [ 91.191805, 33.129547 ], [ 91.136651, 33.075875 ], [ 91.075369, 33.116129 ], [ 91.044728, 33.102711 ], [ 90.928293, 33.125074 ], [ 90.799601, 33.116129 ], [ 90.70155, 33.138493 ], [ 90.487063, 33.268201 ], [ 90.401269, 33.263728 ], [ 90.321602, 33.321873 ], [ 90.241936, 33.429218 ], [ 90.088731, 33.469472 ], [ 90.082603, 33.53209 ], [ 90.009065, 33.558926 ], [ 89.984552, 33.630489 ], [ 90.009065, 33.688634 ], [ 89.984552, 33.728888 ], [ 89.898758, 33.760197 ], [ 89.941655, 33.804924 ], [ 89.898758, 33.809397 ], [ 89.837476, 33.872014 ], [ 89.794579, 33.867542 ], [ 89.733297, 33.921214 ], [ 89.635246, 34.041977 ], [ 89.65363, 34.100122 ], [ 89.745553, 34.131431 ], [ 89.819091, 34.18063 ], [ 89.825219, 34.301393 ], [ 89.868117, 34.332702 ], [ 89.800707, 34.390847 ], [ 89.819091, 34.422156 ], [ 89.812963, 34.551864 ], [ 89.776194, 34.5787 ], [ 89.794579, 34.6279 ], [ 89.739425, 34.645791 ], [ 89.727169, 34.735244 ], [ 89.800707, 34.74419 ], [ 89.849732, 34.824698 ], [ 89.819091, 34.905207 ], [ 89.702656, 34.918625 ], [ 89.659758, 34.887316 ], [ 89.58622, 34.896261 ], [ 89.561708, 34.932043 ], [ 89.592348, 35.034915 ], [ 89.58622, 35.115423 ], [ 89.51881, 35.137787 ], [ 89.4514, 35.231714 ], [ 89.500426, 35.289859 ], [ 89.494297, 35.365894 ], [ 89.690399, 35.419567 ], [ 89.763938, 35.482184 ], [ 89.708784, 35.509021 ], [ 89.708784, 35.576111 ], [ 89.763938, 35.594002 ], [ 89.745553, 35.65662 ], [ 89.782322, 35.862363 ], [ 89.708784, 35.848945 ], [ 89.604605, 35.862363 ], [ 89.426887, 35.916036 ], [ 89.414631, 36.045744 ], [ 89.469785, 36.02338 ], [ 89.635246, 36.050217 ], [ 89.684271, 36.090471 ], [ 89.482041, 36.153089 ], [ 89.371734, 36.229124 ], [ 89.285939, 36.233597 ], [ 89.230786, 36.296215 ], [ 89.200145, 36.260433 ], [ 89.120478, 36.255961 ], [ 89.053068, 36.300688 ], [ 88.961145, 36.318578 ], [ 88.924376, 36.363305 ], [ 88.814069, 36.345414 ], [ 88.783428, 36.291742 ], [ 88.70989, 36.35436 ], [ 88.617967, 36.394614 ], [ 88.568942, 36.461705 ], [ 88.501532, 36.443814 ], [ 88.470891, 36.484068 ], [ 88.354455, 36.479595 ], [ 88.366711, 36.457232 ], [ 88.244148, 36.47065 ], [ 88.127712, 36.425923 ], [ 87.962251, 36.430396 ], [ 87.943867, 36.399087 ], [ 87.790662, 36.376723 ], [ 87.735508, 36.385669 ], [ 87.545535, 36.340942 ], [ 87.465868, 36.35436 ], [ 87.422971, 36.425923 ], [ 87.306535, 36.363305 ], [ 87.1901, 36.349887 ], [ 87.147203, 36.296215 ], [ 86.993998, 36.309633 ], [ 86.926588, 36.264906 ], [ 86.779512, 36.296215 ], [ 86.644691, 36.229124 ], [ 86.528256, 36.229124 ], [ 86.387308, 36.206761 ], [ 86.185078, 36.130725 ], [ 86.197334, 36.032326 ], [ 86.14218, 36.001017 ], [ 86.080898, 35.862363 ], [ 85.958335, 35.7908 ], [ 85.80513, 35.781855 ], [ 85.682566, 35.750546 ], [ 85.615156, 35.652147 ], [ 85.566131, 35.643201 ], [ 85.510977, 35.683456 ], [ 85.370029, 35.701346 ], [ 85.284234, 35.7908 ], [ 85.137158, 35.741601 ], [ 85.051363, 35.755019 ], [ 84.971697, 35.705819 ], [ 84.849133, 35.665565 ], [ 84.836877, 35.638729 ], [ 84.695929, 35.620838 ], [ 84.450801, 35.549275 ], [ 84.450801, 35.477712 ], [ 84.334366, 35.415094 ], [ 84.205674, 35.383785 ], [ 84.181161, 35.356949 ], [ 84.095367, 35.365894 ], [ 84.058597, 35.410621 ], [ 83.911521, 35.410621 ], [ 83.88088, 35.365894 ], [ 83.67865, 35.365894 ], [ 83.617368, 35.339058 ], [ 83.537702, 35.343531 ], [ 83.482548, 35.401676 ], [ 83.396753, 35.383785 ], [ 83.249677, 35.419567 ], [ 83.188395, 35.392731 ], [ 83.120985, 35.397203 ], [ 83.065831, 35.464294 ], [ 82.998421, 35.486657 ], [ 82.96778, 35.549275 ], [ 82.96778, 35.670038 ], [ 82.790063, 35.687928 ], [ 82.728781, 35.638729 ], [ 82.624602, 35.692401 ], [ 82.465269, 35.719237 ], [ 82.403987, 35.701346 ], [ 82.391731, 35.65662 ], [ 82.330449, 35.652147 ], [ 82.348834, 35.611893 ], [ 82.318193, 35.553748 ], [ 82.263039, 35.549275 ], [ 82.183373, 35.495603 ], [ 82.042425, 35.450876 ], [ 82.042425, 35.361422 ], [ 82.011784, 35.330113 ], [ 81.858579, 35.263022 ], [ 81.803425, 35.27644 ], [ 81.674733, 35.236186 ], [ 81.564426, 35.240659 ], [ 81.423478, 35.361422 ], [ 81.386709, 35.339058 ], [ 81.264145, 35.343531 ], [ 81.202863, 35.32564 ], [ 81.092556, 35.410621 ], [ 81.025146, 35.383785 ], [ 81.049659, 35.334586 ], [ 80.951608, 35.312222 ], [ 80.8413, 35.348004 ], [ 80.694224, 35.339058 ], [ 80.657455, 35.397203 ], [ 80.442968, 35.419567 ], [ 80.430712, 35.450876 ], [ 80.36943, 35.388258 ], [ 80.295892, 35.370367 ], [ 80.265251, 35.294331 ], [ 80.363302, 35.20935 ], [ 80.259123, 35.204877 ], [ 80.23461, 35.146732 ], [ 80.118174, 35.066224 ], [ 80.075277, 35.079642 ], [ 80.03238, 35.039388 ], [ 80.038508, 34.905207 ], [ 80.001739, 34.86048 ], [ 79.946585, 34.864953 ], [ 79.903688, 34.748663 ], [ 79.909816, 34.69499 ], [ 79.842406, 34.551864 ], [ 79.860791, 34.529501 ], [ 79.799509, 34.480301 ], [ 79.621791, 34.448992 ], [ 79.535997, 34.471355 ], [ 79.364408, 34.431101 ], [ 79.272485, 34.440047 ], [ 79.198947, 34.417683 ], [ 79.162178, 34.444519 ], [ 79.008973, 34.399792 ], [ 79.027358, 34.368484 ], [ 79.039614, 34.332702 ] ] ] }, \"iso_3166_2\" : \"CN-XZ\", \"division_code\" : \"54\", \"label_en\" : \"Tibet\", \"label_zh\" : \"è¥¿è\u0097\u008Fè\u0087ªæ²»å\u008Cº\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"r4l7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"polygon\", \"coordinates\" : [ [ [ 121.489551, 53.332708 ], [ 121.599859, 53.261145 ], [ 121.673397, 53.238781 ], [ 121.648884, 53.180636 ], [ 121.740807, 53.149328 ], [ 121.808217, 53.064346 ], [ 121.704038, 52.992783 ], [ 121.612115, 52.85413 ], [ 121.379244, 52.68864 ], [ 121.287321, 52.661804 ], [ 121.183142, 52.594713 ], [ 121.317962, 52.567877 ], [ 121.354731, 52.527623 ], [ 121.514064, 52.45606 ], [ 121.642756, 52.442642 ], [ 121.648884, 52.388969 ], [ 121.710166, 52.312934 ], [ 121.83273, 52.281625 ], [ 121.943037, 52.295043 ], [ 121.96755, 52.344243 ], [ 122.157523, 52.514205 ], [ 122.200421, 52.469478 ], [ 122.3046, 52.473951 ], [ 122.335241, 52.411333 ], [ 122.408779, 52.371079 ], [ 122.43942, 52.393442 ], [ 122.470061, 52.295043 ], [ 122.580368, 52.263734 ], [ 122.758086, 52.263734 ], [ 122.764214, 52.178753 ], [ 122.623265, 52.134026 ], [ 122.617137, 52.066935 ], [ 122.666163, 51.981954 ], [ 122.721316, 51.977482 ], [ 122.696804, 51.888028 ], [ 122.764214, 51.77621 ], [ 122.739701, 51.740429 ], [ 122.850008, 51.606248 ], [ 122.880649, 51.539158 ], [ 122.850008, 51.47654 ], [ 122.892906, 51.413922 ], [ 122.954187, 51.391559 ], [ 122.997085, 51.31105 ], [ 123.064495, 51.319995 ], [ 123.272853, 51.248432 ], [ 123.334135, 51.270796 ], [ 123.560878, 51.288687 ], [ 123.652801, 51.315523 ], [ 123.720211, 51.396031 ], [ 123.836646, 51.364722 ], [ 123.916313, 51.297632 ], [ 124.063389, 51.319995 ], [ 124.118543, 51.346832 ], [ 124.222722, 51.346832 ], [ 124.339157, 51.270796 ], [ 124.400439, 51.270796 ], [ 124.418824, 51.337886 ], [ 124.480106, 51.378141 ], [ 124.547516, 51.373668 ], [ 124.627182, 51.324468 ], [ 124.743617, 51.355777 ], [ 124.780387, 51.391559 ], [ 124.841668, 51.378141 ], [ 124.933591, 51.440758 ], [ 124.927463, 51.498903 ], [ 125.03777, 51.525739 ], [ 125.099052, 51.65992 ], [ 125.129693, 51.633084 ], [ 125.34418, 51.624139 ], [ 125.374821, 51.583884 ], [ 125.515769, 51.489958 ], [ 125.632204, 51.36025 ], [ 125.754768, 51.26185 ], [ 125.754768, 51.257378 ], [ 125.754768, 51.24396 ], [ 125.767024, 51.221596 ], [ 125.779281, 51.226069 ], [ 125.785409, 51.226069 ], [ 125.809922, 51.226069 ], [ 125.81605, 51.221596 ], [ 125.822178, 51.221596 ], [ 125.840563, 51.208178 ], [ 125.846691, 51.208178 ], [ 125.846691, 51.203705 ], [ 125.871204, 51.158978 ], [ 125.871204, 51.154506 ], [ 125.858947, 51.141088 ], [ 125.865075, 51.141088 ], [ 125.88346, 51.132142 ], [ 125.920229, 51.12767 ], [ 125.926357, 51.118724 ], [ 125.926357, 51.114252 ], [ 125.932485, 51.105306 ], [ 125.981511, 51.105306 ], [ 125.969254, 51.087415 ], [ 125.975383, 51.082943 ], [ 126.006024, 51.056107 ], [ 126.042793, 51.033743 ], [ 126.036665, 51.02927 ], [ 126.042793, 50.993489 ], [ 126.042793, 50.975598 ], [ 126.048921, 50.975598 ], [ 126.061177, 50.96218 ], [ 125.975383, 50.868253 ], [ 125.914101, 50.850363 ], [ 125.88346, 50.801163 ], [ 125.754768, 50.751963 ], [ 125.81605, 50.707236 ], [ 125.779281, 50.675927 ], [ 125.81605, 50.546219 ], [ 125.724127, 50.519383 ], [ 125.61382, 50.443347 ], [ 125.528025, 50.420984 ], [ 125.515769, 50.309167 ], [ 125.429974, 50.255494 ], [ 125.436102, 50.201822 ], [ 125.252257, 50.094477 ], [ 125.325795, 50.058696 ], [ 125.24, 50.04975 ], [ 125.282898, 50.000551 ], [ 125.178719, 49.955824 ], [ 125.24, 49.86637 ], [ 125.17259, 49.81717 ], [ 125.221616, 49.799279 ], [ 125.20936, 49.665099 ], [ 125.129693, 49.674044 ], [ 125.227744, 49.557754 ], [ 125.215488, 49.486191 ], [ 125.258385, 49.459355 ], [ 125.252257, 49.311756 ], [ 125.215488, 49.190993 ], [ 125.117437, 49.177575 ], [ 125.10518, 49.123903 ], [ 125.031642, 49.173102 ], [ 124.853925, 49.164157 ], [ 124.798771, 49.106012 ], [ 124.823284, 49.07023 ], [ 124.743617, 48.976304 ], [ 124.749746, 48.931577 ], [ 124.608797, 48.752669 ], [ 124.621054, 48.690051 ], [ 124.578156, 48.591652 ], [ 124.535259, 48.573761 ], [ 124.510746, 48.332236 ], [ 124.547516, 48.327763 ], [ 124.559772, 48.224891 ], [ 124.49849, 48.166746 ], [ 124.49849, 48.117546 ], [ 124.412696, 48.086237 ], [ 124.467849, 48.135437 ], [ 124.455593, 48.198055 ], [ 124.394311, 48.233836 ], [ 124.375926, 48.291981 ], [ 124.302388, 48.368017 ], [ 124.326901, 48.417217 ], [ 124.308516, 48.502198 ], [ 124.265619, 48.529034 ], [ 124.069517, 48.430635 ], [ 123.855031, 48.260672 ], [ 123.732467, 48.189109 ], [ 123.573134, 48.04151 ], [ 123.291238, 47.952057 ], [ 123.187059, 47.804458 ], [ 122.899034, 47.688168 ], [ 122.758086, 47.616604 ], [ 122.617137, 47.562932 ], [ 122.543599, 47.513733 ], [ 122.494574, 47.406388 ], [ 122.390394, 47.34377 ], [ 122.445548, 47.303516 ], [ 122.525215, 47.196171 ], [ 122.611009, 47.120135 ], [ 122.678419, 47.088827 ], [ 122.84388, 47.057518 ], [ 122.764214, 46.977009 ], [ 122.794855, 46.936755 ], [ 122.886777, 46.959118 ], [ 122.886777, 46.815992 ], [ 122.990957, 46.757847 ], [ 123.003213, 46.722066 ], [ 123.162546, 46.744429 ], [ 123.236084, 46.851774 ], [ 123.35252, 46.860719 ], [ 123.364776, 46.954646 ], [ 123.309622, 46.963591 ], [ 123.31575, 47.012791 ], [ 123.38316, 46.963591 ], [ 123.389289, 46.959118 ], [ 123.413801, 46.954646 ], [ 123.426058, 46.950173 ], [ 123.426058, 46.954646 ], [ 123.432186, 46.959118 ], [ 123.438314, 46.959118 ], [ 123.444442, 46.959118 ], [ 123.456699, 46.954646 ], [ 123.456699, 46.950173 ], [ 123.462827, 46.950173 ], [ 123.468955, 46.950173 ], [ 123.48734, 46.950173 ], [ 123.499596, 46.950173 ], [ 123.511852, 46.950173 ], [ 123.475083, 46.869665 ], [ 123.493468, 46.824938 ], [ 123.567006, 46.82941 ], [ 123.573134, 46.896501 ], [ 123.634416, 46.811519 ], [ 123.591519, 46.686284 ], [ 123.395417, 46.681811 ], [ 123.272853, 46.659448 ], [ 123.217699, 46.587885 ], [ 123.174802, 46.610248 ], [ 122.997085, 46.569994 ], [ 123.009341, 46.417922 ], [ 123.107392, 46.332941 ], [ 123.168674, 46.24796 ], [ 123.242212, 46.270323 ], [ 123.358648, 46.221124 ], [ 123.511852, 46.252433 ], [ 123.603775, 46.24796 ], [ 123.793749, 46.265851 ], [ 123.897928, 46.301632 ], [ 124.008235, 46.109306 ], [ 124.008235, 45.979598 ], [ 123.95921, 45.948289 ], [ 124.057261, 45.881199 ], [ 124.057261, 45.791745 ], [ 124.002107, 45.778327 ], [ 124.124671, 45.688873 ], [ 124.130799, 45.630728 ], [ 124.265619, 45.590474 ], [ 124.277875, 45.536802 ], [ 124.345285, 45.545747 ], [ 124.345285, 45.487602 ], [ 124.406567, 45.43393 ], [ 124.467849, 45.456293 ], [ 124.541387, 45.407093 ], [ 124.614926, 45.43393 ], [ 124.884566, 45.438402 ], [ 124.878438, 45.492075 ], [ 125.025514, 45.487602 ], [ 125.056155, 45.393675 ], [ 125.258385, 45.416039 ], [ 125.374821, 45.398148 ], [ 125.429974, 45.465238 ], [ 125.583179, 45.487602 ], [ 125.632204, 45.518911 ], [ 125.68123, 45.492075 ], [ 125.717999, 45.420512 ], [ 125.693486, 45.340003 ], [ 125.914101, 45.187931 ], [ 126.097946, 45.138732 ], [ 126.306305, 45.143204 ], [ 126.392099, 45.214768 ], [ 126.575945, 45.250549 ], [ 126.680124, 45.183459 ], [ 126.723021, 45.187931 ], [ 126.784303, 45.134259 ], [ 126.955892, 45.134259 ], [ 126.968149, 45.067169 ], [ 127.0662, 44.973242 ], [ 127.084584, 44.924042 ], [ 126.99879, 44.879315 ], [ 126.986533, 44.763025 ], [ 127.035559, 44.70488 ], [ 127.023302, 44.593063 ], [ 127.207148, 44.63779 ], [ 127.256173, 44.597536 ], [ 127.274558, 44.633317 ], [ 127.409378, 44.624372 ], [ 127.53807, 44.575172 ], [ 127.531942, 44.5215 ], [ 127.452275, 44.503609 ], [ 127.507429, 44.382846 ], [ 127.611608, 44.279974 ], [ 127.587095, 44.226302 ], [ 127.685146, 44.168157 ], [ 127.715787, 44.194993 ], [ 127.734172, 44.096594 ], [ 127.868992, 44.065285 ], [ 128.095735, 44.132375 ], [ 128.040581, 44.181575 ], [ 128.101863, 44.217357 ], [ 128.058966, 44.248666 ], [ 128.095735, 44.284447 ], [ 128.046709, 44.347065 ], [ 128.163145, 44.338119 ], [ 128.199914, 44.418628 ], [ 128.359247, 44.508082 ], [ 128.432785, 44.463355 ], [ 128.469554, 44.347065 ], [ 128.451169, 44.257611 ], [ 128.463426, 44.159212 ], [ 128.512451, 44.118957 ], [ 128.647271, 43.89085 ], [ 128.769835, 43.72536 ], [ 128.849501, 43.559871 ], [ 128.929168, 43.555398 ], [ 129.002706, 43.519616 ], [ 129.143654, 43.568816 ], [ 129.19268, 43.568816 ], [ 129.229449, 43.631434 ], [ 129.204936, 43.685106 ], [ 129.211064, 43.783505 ], [ 129.26009, 43.814814 ], [ 129.352013, 43.796923 ], [ 129.492961, 43.877432 ], [ 129.658422, 43.868487 ], [ 129.774857, 43.895323 ], [ 129.774857, 43.95794 ], [ 129.940318, 44.029504 ], [ 130.013857, 43.95794 ], [ 130.0016, 43.881905 ], [ 130.062882, 43.837178 ], [ 130.142548, 43.877432 ], [ 130.167061, 43.926632 ], [ 130.240599, 43.944522 ], [ 130.301881, 44.029504 ], [ 130.357035, 44.042922 ], [ 130.350907, 43.984777 ], [ 130.332522, 43.944522 ], [ 130.375419, 43.908741 ], [ 130.369291, 43.82376 ], [ 130.418317, 43.743251 ], [ 130.40606, 43.649324 ], [ 130.516368, 43.631434 ], [ 130.57765, 43.613543 ], [ 130.583778, 43.613543 ], [ 130.608291, 43.618016 ], [ 130.608291, 43.622488 ], [ 130.620547, 43.618016 ], [ 130.675701, 43.564343 ], [ 130.786008, 43.524089 ], [ 130.853418, 43.434635 ], [ 131.000494, 43.501726 ], [ 131.123058, 43.452526 ], [ 131.147571, 43.416744 ], [ 131.282391, 43.474889 ], [ 131.196596, 43.524089 ], [ 131.214981, 43.82376 ], [ 131.257878, 43.935577 ], [ 131.239494, 43.989249 ], [ 131.300775, 44.042922 ], [ 131.104673, 44.709353 ], [ 131.055648, 44.785389 ], [ 131.012751, 44.780916 ], [ 130.957597, 44.852479 ], [ 131.092417, 44.888261 ], [ 131.092417, 44.932988 ], [ 131.153699, 44.946406 ], [ 131.196596, 44.915097 ], [ 131.282391, 44.924042 ], [ 131.343673, 44.982187 ], [ 131.478493, 44.982187 ], [ 131.686851, 45.120841 ], [ 131.650082, 45.15215 ], [ 131.674595, 45.21924 ], [ 131.784902, 45.210295 ], [ 131.821671, 45.308694 ], [ 131.907466, 45.340003 ], [ 131.931978, 45.277385 ], [ 132.005517, 45.250549 ], [ 132.845078, 45.062696 ], [ 132.979898, 45.026914 ], [ 133.126975, 45.120841 ], [ 133.133103, 45.174513 ], [ 133.090205, 45.263967 ], [ 133.139231, 45.366839 ], [ 133.139231, 45.424984 ], [ 133.194385, 45.514438 ], [ 133.249538, 45.514438 ], [ 133.390486, 45.577056 ], [ 133.402743, 45.61731 ], [ 133.470153, 45.621783 ], [ 133.476281, 45.688873 ], [ 133.421127, 45.697819 ], [ 133.457897, 45.751491 ], [ 133.464025, 45.836472 ], [ 133.519178, 45.894617 ], [ 133.586588, 45.867781 ], [ 133.598845, 45.934871 ], [ 133.672383, 45.943817 ], [ 133.672383, 45.984071 ], [ 133.733665, 46.077998 ], [ 133.696896, 46.162979 ], [ 133.825588, 46.203233 ], [ 133.905254, 46.256905 ], [ 133.862357, 46.355305 ], [ 133.935895, 46.377668 ], [ 133.905254, 46.440286 ], [ 133.843972, 46.449231 ], [ 133.911382, 46.59683 ], [ 134.015561, 46.663921 ], [ 134.046202, 46.780211 ], [ 134.015561, 46.811519 ], [ 134.033946, 46.887555 ], [ 134.138125, 47.093299 ], [ 134.217791, 47.106717 ], [ 134.22392, 47.17828 ], [ 134.15651, 47.240898 ], [ 134.168766, 47.316934 ], [ 134.254561, 47.366134 ], [ 134.321971, 47.437697 ], [ 134.487432, 47.442169 ], [ 134.573226, 47.491369 ], [ 134.677405, 47.594241 ], [ 134.677405, 47.630023 ], [ 134.769328, 47.710531 ], [ 134.775456, 47.746313 ], [ 134.665149, 47.826821 ], [ 134.671277, 47.876021 ], [ 134.603867, 47.902857 ], [ 134.542585, 48.02362 ], [ 134.671277, 48.153328 ], [ 134.665149, 48.238309 ], [ 134.769328, 48.359072 ], [ 134.665149, 48.412744 ], [ 134.469047, 48.421689 ], [ 134.395509, 48.385908 ], [ 134.187151, 48.385908 ], [ 134.138125, 48.336708 ], [ 134.033946, 48.345654 ], [ 133.948151, 48.305399 ], [ 133.745921, 48.2562 ], [ 133.709152, 48.189109 ], [ 133.58046, 48.189109 ], [ 133.568204, 48.135437 ], [ 133.464025, 48.108601 ], [ 133.414999, 48.122019 ], [ 133.286307, 48.09071 ], [ 133.182128, 48.108601 ], [ 133.047308, 48.104128 ], [ 133.010539, 48.04151 ], [ 132.863463, 47.992311 ], [ 132.820565, 47.938638 ], [ 132.716386, 47.961002 ], [ 132.655104, 47.947584 ], [ 132.679617, 47.871548 ], [ 132.599951, 47.813403 ], [ 132.606079, 47.74184 ], [ 132.483515, 47.715004 ], [ 132.342567, 47.759731 ], [ 132.250644, 47.706058 ], [ 132.072927, 47.697113 ], [ 132.017773, 47.715004 ], [ 131.950363, 47.661331 ], [ 131.913594, 47.688168 ], [ 131.809415, 47.665804 ], [ 131.711364, 47.710531 ], [ 131.619441, 47.656859 ], [ 131.564287, 47.665804 ], [ 131.545903, 47.728422 ], [ 131.423339, 47.74184 ], [ 131.25175, 47.732895 ], [ 131.141443, 47.688168 ], [ 131.025007, 47.688168 ], [ 130.957597, 47.719476 ], [ 130.951469, 47.826821 ], [ 130.865674, 47.934166 ], [ 130.681829, 48.045983 ], [ 130.669572, 48.130964 ], [ 130.749239, 48.180164 ], [ 130.767623, 48.247254 ], [ 130.835033, 48.300927 ], [ 130.773752, 48.350126 ], [ 130.730854, 48.430635 ], [ 130.736982, 48.511143 ], [ 130.608291, 48.497725 ], [ 130.608291, 48.573761 ], [ 130.528624, 48.60507 ], [ 130.614419, 48.78845 ], [ 130.681829, 48.851068 ], [ 130.632803, 48.882377 ], [ 130.534752, 48.855541 ], [ 130.467342, 48.900268 ], [ 130.387676, 48.900268 ], [ 130.265112, 48.860014 ], [ 130.050626, 48.971831 ], [ 129.995472, 49.021031 ], [ 129.928062, 49.034449 ], [ 129.897421, 49.106012 ], [ 129.848396, 49.114957 ], [ 129.842267, 49.177575 ], [ 129.774857, 49.177575 ], [ 129.750345, 49.253611 ], [ 129.689063, 49.298338 ], [ 129.578755, 49.275974 ], [ 129.535858, 49.396737 ], [ 129.407166, 49.441464 ], [ 129.376525, 49.365428 ], [ 129.309115, 49.356483 ], [ 129.223321, 49.40121 ], [ 129.143654, 49.356483 ], [ 129.076244, 49.35201 ], [ 129.008834, 49.445937 ], [ 128.861758, 49.490663 ], [ 128.745322, 49.481718 ], [ 128.800476, 49.548808 ], [ 128.518579, 49.602481 ], [ 128.377631, 49.589063 ], [ 128.322478, 49.544336 ], [ 128.248939, 49.566699 ], [ 128.169273, 49.53539 ], [ 128.034453, 49.557754 ], [ 127.960915, 49.598008 ], [ 127.893505, 49.571172 ], [ 127.795454, 49.593535 ], [ 127.685146, 49.665099 ], [ 127.666762, 49.772443 ], [ 127.53807, 49.799279 ], [ 127.544198, 49.93346 ], [ 127.489044, 49.991605 ], [ 127.501301, 50.058696 ], [ 127.587095, 50.143677 ], [ 127.60548, 50.233131 ], [ 127.366481, 50.291276 ], [ 127.323583, 50.336003 ], [ 127.366481, 50.403093 ], [ 127.286814, 50.470184 ], [ 127.366481, 50.573056 ], [ 127.286814, 50.662509 ], [ 127.292942, 50.756436 ], [ 127.231661, 50.774327 ], [ 127.109097, 50.935344 ], [ 126.919123, 51.056107 ], [ 126.89461, 51.203705 ], [ 126.974277, 51.328941 ], [ 126.870098, 51.315523 ], [ 126.912995, 51.252905 ], [ 126.857841, 51.24396 ], [ 126.808816, 51.288687 ], [ 126.8272, 51.342359 ], [ 126.925251, 51.364722 ], [ 126.89461, 51.409449 ], [ 126.778175, 51.445231 ], [ 126.833329, 51.534685 ], [ 126.667868, 51.597303 ], [ 126.735278, 51.637557 ], [ 126.716893, 51.727011 ], [ 126.667868, 51.727011 ], [ 126.55756, 51.861192 ], [ 126.465637, 51.937227 ], [ 126.434997, 52.013263 ], [ 126.514663, 52.035627 ], [ 126.55756, 52.120608 ], [ 126.49015, 52.160862 ], [ 126.349202, 52.187698 ], [ 126.294048, 52.22348 ], [ 126.434997, 52.286097 ], [ 126.343074, 52.299516 ], [ 126.312433, 52.344243 ], [ 126.349202, 52.384497 ], [ 126.263407, 52.473951 ], [ 126.183741, 52.469478 ], [ 126.202126, 52.52315 ], [ 126.097946, 52.594713 ], [ 126.012152, 52.576823 ], [ 125.963126, 52.62155 ], [ 125.981511, 52.675222 ], [ 126.067305, 52.68864 ], [ 126.042793, 52.746785 ], [ 126.110203, 52.75573 ], [ 126.048921, 52.795985 ], [ 125.926357, 52.769148 ], [ 125.840563, 52.876493 ], [ 125.767024, 52.898857 ], [ 125.675102, 52.858602 ], [ 125.656717, 52.916747 ], [ 125.730255, 52.943584 ], [ 125.736383, 52.992783 ], [ 125.68123, 53.001729 ], [ 125.607692, 53.082237 ], [ 125.509641, 53.046456 ], [ 125.497384, 53.095655 ], [ 125.301282, 53.144855 ], [ 125.17259, 53.203 ], [ 124.97036, 53.194054 ], [ 124.878438, 53.167218 ], [ 124.884566, 53.095655 ], [ 124.823284, 53.144855 ], [ 124.712977, 53.149328 ], [ 124.676207, 53.203 ], [ 124.49849, 53.203 ], [ 124.369798, 53.252199 ], [ 124.320773, 53.328235 ], [ 124.234978, 53.377435 ], [ 124.130799, 53.346126 ], [ 124.008235, 53.395326 ], [ 123.855031, 53.489252 ], [ 123.707954, 53.489252 ], [ 123.62216, 53.547397 ], [ 123.389289, 53.533979 ], [ 123.303494, 53.560815 ], [ 123.168674, 53.507143 ], [ 123.003213, 53.498198 ], [ 122.850008, 53.457943 ], [ 122.568112, 53.462416 ], [ 122.427164, 53.444525 ], [ 122.341369, 53.50267 ], [ 122.243318, 53.462416 ], [ 122.157523, 53.471362 ], [ 122.108498, 53.426635 ], [ 121.869499, 53.426635 ], [ 121.691781, 53.390853 ], [ 121.489551, 53.332708 ] ] ] }, \"iso_3166_2\" : \"CN-HL\", \"division_code\" : \"23\", \"label_en\" : \"Heilongjiang\", \"label_zh\" : \"é»\u0091é¾\u0099æ±\u009Fç\u009C\u0081\" } }, { \"_index\" : \"china_provinces_v1\", \"_type\" : \"_doc\", \"_id\" : \"sIl7pnIBLg-rvzvwS3nG\", \"_score\" : 1.0, \"_source\" : { \"coordinates\" : { \"type\" : \"multipolygon\", \"coordinates\" : [ [ [ [ 97.712194, 33.375545 ], [ 97.620271, 33.339764 ], [ 97.601886, 33.259255 ], [ 97.485451, 33.165329 ], [ 97.491579, 33.111656 ], [ 97.540604, 33.035621 ], [ 97.52222, 32.990894 ], [ 97.369015, 32.955112 ], [ 97.350631, 32.90144 ], [ 97.393528, 32.829877 ], [ 97.381272, 32.794095 ], [ 97.424169, 32.704641 ], [ 97.467066, 32.664387 ], [ 97.58963, 32.610715 ], [ 97.730578, 32.530206 ], [ 98.024731, 32.45417 ], [ 98.073756, 32.404971 ], [ 98.202448, 32.360244 ], [ 98.220833, 32.235008 ], [ 98.269858, 32.199227 ], [ 98.300499, 32.123191 ], [ 98.404678, 32.051628 ], [ 98.435319, 32.011374 ], [ 98.39855, 31.899556 ], [ 98.416935, 31.832466 ], [ 98.502729, 31.760903 ], [ 98.521114, 31.720648 ], [ 98.551755, 31.658031 ], [ 98.637549, 31.59094 ], [ 98.711088, 31.510432 ], [ 98.784626, 31.479123 ], [ 98.888805, 31.376251 ], [ 98.809139, 31.309161 ], [ 98.778498, 31.251015 ], [ 98.711088, 31.309161 ], [ 98.643678, 31.340469 ], [ 98.606909, 31.273379 ], [ 98.606909, 31.183925 ], [ 98.637549, 31.183925 ], [ 98.711088, 31.116835 ], [ 98.7356, 31.05869 ], [ 98.809139, 30.996072 ], [ 98.778498, 30.8932 ], [ 98.962343, 30.72771 ], [ 98.90719, 30.700874 ], [ 98.943959, 30.593529 ], [ 98.925574, 30.575639 ], [ 98.968471, 30.450403 ], [ 98.968471, 30.334113 ], [ 98.992984, 30.217823 ], [ 98.986856, 30.155205 ], [ 99.04201, 30.088115 ], [ 99.035882, 30.021025 ], [ 99.054266, 29.895789 ], [ 99.011369, 29.815281 ], [ 98.992984, 29.658736 ], [ 99.048138, 29.569282 ], [ 99.048138, 29.533501 ], [ 99.060394, 29.417211 ], [ 99.066522, 29.300921 ], [ 99.115548, 29.224885 ], [ 99.115548, 29.032559 ], [ 99.127804, 28.898378 ], [ 99.103292, 28.808924 ], [ 99.133932, 28.741834 ], [ 99.127804, 28.692634 ], [ 99.189086, 28.513726 ], [ 99.170702, 28.406382 ], [ 99.225855, 28.352709 ], [ 99.287137, 28.299037 ], [ 99.305522, 28.231947 ], [ 99.385188, 28.18722 ], [ 99.409701, 28.267728 ], [ 99.391316, 28.325873 ], [ 99.440342, 28.401909 ], [ 99.391316, 28.527145 ], [ 99.458726, 28.553981 ], [ 99.501624, 28.625544 ], [ 99.538393, 28.630017 ], [ 99.532264, 28.683689 ], [ 99.618059, 28.746307 ], [ 99.624187, 28.81787 ], [ 99.691597, 28.81787 ], [ 99.71611, 28.849179 ], [ 99.728366, 28.723943 ], [ 99.808033, 28.692634 ], [ 99.887699, 28.607653 ], [ 99.955109, 28.576344 ], [ 99.998007, 28.469 ], [ 100.059288, 28.451109 ], [ 100.05316, 28.379546 ], [ 100.151211, 28.343764 ], [ 100.145083, 28.290092 ], [ 100.18798, 28.25431 ], [ 100.151211, 28.209583 ], [ 100.059288, 28.196165 ], [ 100.022519, 28.164856 ], [ 100.059288, 28.084348 ], [ 100.18798, 27.990421 ], [ 100.175724, 27.900967 ], [ 100.298288, 27.874131 ], [ 100.286031, 27.815986 ], [ 100.316672, 27.726532 ], [ 100.445364, 27.865186 ], [ 100.549543, 27.815986 ], [ 100.678235, 27.918858 ], [ 100.721132, 27.860713 ], [ 100.708876, 27.798095 ], [ 100.757901, 27.771259 ], [ 100.788542, 27.686278 ], [ 100.83144, 27.686278 ], [ 100.855952, 27.601297 ], [ 100.911106, 27.525261 ], [ 100.89885, 27.480534 ], [ 100.947875, 27.462643 ], [ 101.052054, 27.203227 ], [ 101.094952, 27.2077 ], [ 101.10108, 27.2077 ], [ 101.113336, 27.2077 ], [ 101.113336, 27.212172 ], [ 101.150105, 27.203227 ], [ 101.16849, 27.167445 ], [ 101.137849, 27.024319 ], [ 101.266541, 26.957229 ], [ 101.266541, 26.908029 ], [ 101.364592, 26.885666 ], [ 101.395233, 26.836466 ], [ 101.352335, 26.773848 ], [ 101.389105, 26.724649 ], [ 101.456515, 26.733594 ], [ 101.462643, 26.791739 ], [ 101.511668, 26.755958 ], [ 101.450386, 26.706758 ], [ 101.481027, 26.675449 ], [ 101.462643, 26.608359 ], [ 101.401361, 26.581522 ], [ 101.401361, 26.57705 ], [ 101.401361, 26.572577 ], [ 101.456515, 26.501014 ], [ 101.50554, 26.501014 ], [ 101.615847, 26.416033 ], [ 101.628104, 26.402615 ], [ 101.652616, 26.331052 ], [ 101.597463, 26.308688 ], [ 101.628104, 26.22818 ], [ 101.695514, 26.24607 ], [ 101.811949, 26.170035 ], [ 101.799693, 26.120835 ], [ 101.867103, 26.06269 ], [ 101.916128, 26.11189 ], [ 101.952898, 26.089526 ], [ 102.026436, 26.098471 ], [ 102.063205, 26.067163 ], [ 102.130615, 26.089526 ], [ 102.173512, 26.152144 ], [ 102.253179, 26.223707 ], [ 102.345101, 26.24607 ], [ 102.381871, 26.29527 ], [ 102.528947, 26.335524 ], [ 102.547331, 26.366833 ], [ 102.62087, 26.348942 ], [ 102.633126, 26.308688 ], [ 102.602485, 26.250543 ], [ 102.663767, 26.210289 ], [ 102.780203, 26.299743 ], [ 102.835356, 26.308688 ], [ 102.878253, 26.366833 ], [ 102.89051, 26.339997 ], [ 102.982433, 26.348942 ], [ 103.000817, 26.447342 ], [ 103.055971, 26.532323 ], [ 103.019202, 26.594941 ], [ 103.02533, 26.666504 ], [ 102.988561, 26.782794 ], [ 102.89051, 26.930393 ], [ 102.872125, 27.024319 ], [ 102.908894, 27.113773 ], [ 102.902766, 27.239009 ], [ 102.884382, 27.292681 ], [ 102.945664, 27.417916 ], [ 102.982433, 27.368717 ], [ 103.049843, 27.413444 ], [ 103.104996, 27.404498 ], [ 103.22756, 27.574461 ], [ 103.29497, 27.569988 ], [ 103.276586, 27.62366 ], [ 103.491072, 27.802568 ], [ 103.503328, 27.923331 ], [ 103.558482, 27.959112 ], [ 103.515585, 27.968058 ], [ 103.491072, 28.035148 ], [ 103.448175, 28.026203 ], [ 103.42979, 28.075402 ], [ 103.540097, 28.178274 ], [ 103.56461, 28.227474 ], [ 103.638148, 28.267728 ], [ 103.717815, 28.200638 ], [ 103.730071, 28.231947 ], [ 103.871019, 28.30351 ], [ 103.852635, 28.410855 ], [ 103.779097, 28.527145 ], [ 103.83425, 28.58529 ], [ 103.846507, 28.670271 ], [ 103.871019, 28.630017 ], [ 103.938429, 28.607653 ], [ 104.128403, 28.643435 ], [ 104.269351, 28.634489 ], [ 104.373531, 28.65238 ], [ 104.385787, 28.60318 ], [ 104.318377, 28.540563 ], [ 104.257095, 28.540563 ], [ 104.269351, 28.392964 ], [ 104.281608, 28.343764 ], [ 104.318377, 28.312455 ], [ 104.379659, 28.334819 ], [ 104.404172, 28.272201 ], [ 104.459325, 28.245365 ], [ 104.404172, 28.209583 ], [ 104.447069, 28.178274 ], [ 104.447069, 28.115657 ], [ 104.373531, 28.053039 ], [ 104.299992, 28.048566 ], [ 104.349018, 28.02173 ], [ 104.398043, 27.95464 ], [ 104.575761, 27.842822 ], [ 104.753478, 27.90544 ], [ 104.876042, 27.909913 ], [ 104.974093, 28.02173 ], [ 104.974093, 28.066457 ], [ 105.041503, 28.102239 ], [ 105.176323, 28.07093 ], [ 105.164066, 28.012785 ], [ 105.268246, 27.999367 ], [ 105.280502, 27.941222 ], [ 105.231477, 27.90544 ], [ 105.237605, 27.824932 ], [ 105.311143, 27.824932 ], [ 105.268246, 27.798095 ], [ 105.298887, 27.708641 ], [ 105.305015, 27.708641 ], [ 105.341784, 27.744423 ], [ 105.427578, 27.771259 ], [ 105.513373, 27.771259 ], [ 105.55627, 27.72206 ], [ 105.599168, 27.72206 ], [ 105.62368, 27.663915 ], [ 105.715603, 27.686278 ], [ 105.764629, 27.72206 ], [ 105.844295, 27.708641 ], [ 105.86268, 27.735478 ], [ 106.022012, 27.748896 ], [ 106.120063, 27.784677 ], [ 106.193602, 27.757841 ], [ 106.33455, 27.829404 ], [ 106.303909, 27.900967 ], [ 106.303909, 27.999367 ], [ 106.254883, 28.017257 ], [ 106.261012, 28.079875 ], [ 106.205858, 28.13802 ], [ 106.107807, 28.169329 ], [ 105.979115, 28.120129 ], [ 105.954602, 28.142493 ], [ 105.874936, 28.129075 ], [ 105.856551, 28.169329 ], [ 105.887192, 28.240892 ], [ 105.801398, 28.312455 ], [ 105.733988, 28.307983 ], [ 105.733988, 28.276674 ], [ 105.635937, 28.312455 ], [ 105.642065, 28.433218 ], [ 105.605296, 28.442163 ], [ 105.617552, 28.522672 ], [ 105.678834, 28.53609 ], [ 105.69109, 28.594235 ], [ 105.783013, 28.612126 ], [ 105.899449, 28.607653 ], [ 105.887192, 28.674743 ], [ 105.936218, 28.688162 ], [ 105.960731, 28.764197 ], [ 106.06491, 28.692634 ], [ 106.107807, 28.634489 ], [ 106.144576, 28.647907 ], [ 106.19973, 28.571872 ], [ 106.285524, 28.540563 ], [ 106.328422, 28.482418 ], [ 106.377447, 28.482418 ], [ 106.371319, 28.527145 ], [ 106.33455, 28.571872 ], [ 106.303909, 28.710525 ], [ 106.242627, 28.795506 ], [ 106.248755, 28.83576 ], [ 106.254883, 28.844706 ], [ 106.169089, 28.925214 ], [ 106.083294, 28.916269 ], [ 106.040397, 28.929687 ], [ 106.034269, 28.93416 ], [ 105.9975, 28.978887 ], [ 105.93009, 28.938632 ], [ 105.881064, 28.916269 ], [ 105.764629, 28.987832 ], [ 105.746244, 29.041504 ], [ 105.740116, 29.041504 ], [ 105.733988, 29.130958 ], [ 105.72786, 29.157794 ], [ 105.703347, 29.180158 ], [ 105.697219, 29.291975 ], [ 105.648193, 29.256194 ], [ 105.629809, 29.28303 ], [ 105.470476, 29.28303 ], [ 105.464348, 29.323284 ], [ 105.415322, 29.314339 ], [ 105.439835, 29.390375 ], [ 105.396938, 29.444047 ], [ 105.335656, 29.461938 ], [ 105.298887, 29.533501 ], [ 105.329527, 29.600591 ], [ 105.384681, 29.667682 ], [ 105.384681, 29.672154 ], [ 105.476604, 29.6811 ], [ 105.482732, 29.721354 ], [ 105.562399, 29.725827 ], [ 105.580783, 29.824226 ], [ 105.684962, 29.855535 ], [ 105.733988, 29.895789 ], [ 105.709475, 29.931571 ], [ 105.72786, 29.994188 ], [ 105.72786, 29.998661 ], [ 105.746244, 30.012079 ], [ 105.746244, 30.021025 ], [ 105.635937, 30.074697 ], [ 105.574655, 30.128369 ], [ 105.544014, 30.155205 ], [ 105.55627, 30.186514 ], [ 105.642065, 30.190987 ], [ 105.617552, 30.275968 ], [ 105.697219, 30.258077 ], [ 105.715603, 30.253605 ], [ 105.709475, 30.325168 ], [ 105.740116, 30.320695 ], [ 105.7585, 30.392258 ], [ 105.764629, 30.401204 ], [ 105.819782, 30.441458 ], [ 105.874936, 30.387785 ], [ 106.028141, 30.37884 ], [ 106.101679, 30.316222 ], [ 106.120063, 30.307277 ], [ 106.126192, 30.307277 ], [ 106.126192, 30.316222 ], [ 106.13232, 30.316222 ], [ 106.150704, 30.31175 ], [ 106.175217, 30.271495 ], [ 106.175217, 30.249132 ], [ 106.175217, 30.244659 ], [ 106.175217, 30.240187 ], [ 106.193602, 30.235714 ], [ 106.19973, 30.231241 ], [ 106.224242, 30.21335 ], [ 106.261012, 30.19546 ], [ 106.303909, 30.240187 ], [ 106.414216, 30.253605 ], [ 106.408088, 30.275968 ], [ 106.555164, 30.320695 ], [ 106.610318, 30.293859 ], [ 106.628703, 30.217823 ], [ 106.628703, 30.199932 ], [ 106.653215, 30.168623 ], [ 106.702241, 30.128369 ], [ 106.732882, 30.025497 ], [ 106.788036, 30.016552 ], [ 106.94124, 30.047861 ], [ 106.984137, 30.083642 ], [ 107.00865, 30.043388 ], [ 107.069932, 30.061279 ], [ 107.253778, 30.258077 ], [ 107.339572, 30.42804 ], [ 107.425367, 30.553275 ], [ 107.511161, 30.651674 ], [ 107.474392, 30.665093 ], [ 107.419239, 30.750074 ], [ 107.449879, 30.77691 ], [ 107.456008, 30.785855 ], [ 107.486649, 30.808219 ], [ 107.486649, 30.812691 ], [ 107.48052, 30.839528 ], [ 107.572443, 30.848473 ], [ 107.633725, 30.817164 ], [ 107.713391, 30.8932 ], [ 107.750161, 30.839528 ], [ 107.835955, 30.794801 ], [ 107.98916, 30.911091 ], [ 107.934006, 30.937927 ], [ 107.940134, 30.991599 ], [ 107.983032, 30.987127 ], [ 108.038185, 31.036326 ], [ 108.007544, 31.116835 ], [ 108.081083, 31.188398 ], [ 108.025929, 31.219707 ], [ 108.05657, 31.255488 ], [ 108.179133, 31.327051 ], [ 108.148493, 31.376251 ], [ 108.197518, 31.398614 ], [ 108.222031, 31.510432 ], [ 108.338466, 31.510432 ], [ 108.387492, 31.546213 ], [ 108.381364, 31.59094 ], [ 108.52844, 31.671449 ], [ 108.503927, 31.738539 ], [ 108.52844, 31.75643 ], [ 108.448774, 31.787739 ], [ 108.381364, 31.854829 ], [ 108.277184, 31.917447 ], [ 108.264928, 31.98901 ], [ 108.369107, 31.98901 ], [ 108.32621, 32.020319 ], [ 108.369107, 32.078464 ], [ 108.448774, 32.078464 ], [ 108.381364, 32.1545 ], [ 108.399748, 32.199227 ], [ 108.473286, 32.181336 ], [ 108.503927, 32.203699 ], [ 108.467158, 32.27079 ], [ 108.387492, 32.266317 ], [ 108.307825, 32.235008 ], [ 108.246544, 32.275263 ], [ 108.173005, 32.22159 ], [ 108.068826, 32.235008 ], [ 108.025929, 32.22159 ], [ 107.983032, 32.145554 ], [ 107.884981, 32.217117 ], [ 107.811442, 32.239481 ], [ 107.750161, 32.33788 ], [ 107.713391, 32.328935 ], [ 107.676622, 32.396025 ], [ 107.590828, 32.413916 ], [ 107.523418, 32.382607 ], [ 107.449879, 32.418389 ], [ 107.443751, 32.463116 ], [ 107.437623, 32.467588 ], [ 107.431495, 32.534679 ], [ 107.370213, 32.539151 ], [ 107.296675, 32.494425 ], [ 107.259906, 32.404971 ], [ 107.149598, 32.476534 ], [ 107.149598, 32.481006 ], [ 107.07606, 32.543624 ], [ 107.100573, 32.592824 ], [ 107.063804, 32.709114 ], [ 107.002522, 32.731477 ], [ 106.910599, 32.704641 ], [ 106.892215, 32.727005 ], [ 106.818676, 32.704641 ], [ 106.726754, 32.740423 ], [ 106.665472, 32.695696 ], [ 106.579677, 32.691223 ], [ 106.414216, 32.615187 ], [ 106.33455, 32.677805 ], [ 106.248755, 32.700168 ], [ 106.169089, 32.695696 ], [ 106.138448, 32.722532 ], [ 106.126192, 32.722532 ], [ 106.071038, 32.762786 ], [ 106.095551, 32.794095 ], [ 106.046525, 32.861185 ], [ 105.991371, 32.829877 ], [ 105.82591, 32.825404 ], [ 105.819782, 32.771732 ], [ 105.764629, 32.771732 ], [ 105.593039, 32.704641 ], [ 105.55627, 32.727005 ], [ 105.55627, 32.794095 ], [ 105.48886, 32.883549 ], [ 105.494988, 32.914858 ], [ 105.415322, 32.932749 ], [ 105.378553, 32.874604 ], [ 105.452091, 32.740423 ], [ 105.360168, 32.713587 ], [ 105.341784, 32.682278 ], [ 105.262117, 32.655442 ], [ 105.213092, 32.664387 ], [ 105.194707, 32.624133 ], [ 105.102785, 32.597297 ], [ 105.041503, 32.650969 ], [ 104.876042, 32.606242 ], [ 104.827016, 32.664387 ], [ 104.741222, 32.637551 ], [ 104.704453, 32.677805 ], [ 104.643171, 32.664387 ], [ 104.575761, 32.727005 ], [ 104.508351, 32.758314 ], [ 104.453197, 32.749368 ], [ 104.361274, 32.825404 ], [ 104.287736, 32.838822 ], [ 104.269351, 32.892494 ], [ 104.299992, 32.955112 ], [ 104.373531, 32.950639 ], [ 104.422556, 33.026675 ], [ 104.361274, 33.031148 ], [ 104.373531, 33.111656 ], [ 104.318377, 33.227946 ], [ 104.330633, 33.3174 ], [ 104.391915, 33.29951 ], [ 104.398043, 33.344236 ], [ 104.293864, 33.330818 ], [ 104.269351, 33.393436 ], [ 104.220326, 33.406854 ], [ 104.152916, 33.545508 ], [ 104.165172, 33.612598 ], [ 104.042609, 33.688634 ], [ 103.96907, 33.670743 ], [ 103.858763, 33.684161 ], [ 103.76684, 33.661798 ], [ 103.644277, 33.684161 ], [ 103.589123, 33.71547 ], [ 103.521713, 33.679689 ], [ 103.552354, 33.742306 ], [ 103.521713, 33.809397 ], [ 103.478816, 33.809397 ], [ 103.417534, 33.746779 ], [ 103.325611, 33.751252 ], [ 103.245945, 33.813869 ], [ 103.154022, 33.813869 ], [ 103.178535, 33.894378 ], [ 103.123381, 33.970414 ], [ 103.16015, 34.001723 ], [ 103.129509, 34.068813 ], [ 103.178535, 34.086704 ], [ 103.123381, 34.118013 ], [ 103.104996, 34.18063 ], [ 103.006945, 34.185103 ], [ 102.921151, 34.310338 ], [ 102.859869, 34.270084 ], [ 102.798587, 34.274557 ], [ 102.780203, 34.234303 ], [ 102.731177, 34.238775 ], [ 102.700536, 34.198521 ], [ 102.596357, 34.144849 ], [ 102.651511, 34.118013 ], [ 102.473793, 34.073286 ], [ 102.437024, 34.086704 ], [ 102.394127, 33.970414 ], [ 102.332845, 33.979359 ], [ 102.320589, 33.983832 ], [ 102.308332, 33.974886 ], [ 102.31386693817684, 33.98296621490374 ], [ 102.21641, 33.970414 ], [ 102.210281, 33.970414 ], [ 102.17964, 33.979359 ], [ 102.136743, 33.974886 ], [ 102.265435, 33.840706 ], [ 102.234794, 33.800451 ], [ 102.296076, 33.787033 ], [ 102.338973, 33.719943 ], [ 102.31446, 33.679689 ], [ 102.338973, 33.608125 ], [ 102.449281, 33.572344 ], [ 102.443152, 33.527617 ], [ 102.479921, 33.456054 ], [ 102.467665, 33.460527 ], [ 102.31446, 33.397909 ], [ 102.296076, 33.4158 ], [ 102.185769, 33.335291 ], [ 102.21641, 33.236892 ], [ 102.142871, 33.272673 ], [ 102.142871, 33.277146 ], [ 102.136743, 33.277146 ], [ 102.130615, 33.277146 ], [ 102.124487, 33.277146 ], [ 102.124487, 33.281619 ], [ 102.118359, 33.281619 ], [ 102.118359, 33.286091 ], [ 102.11223, 33.286091 ], [ 102.106102, 33.263728 ], [ 102.087718, 33.219001 ], [ 102.093846, 33.214528 ], [ 102.075461, 33.196638 ], [ 102.057077, 33.196638 ], [ 101.934513, 33.187692 ], [ 101.860975, 33.107184 ], [ 101.824206, 33.125074 ], [ 101.84259, 33.187692 ], [ 101.769052, 33.272673 ], [ 101.879359, 33.3174 ], [ 101.879359, 33.380018 ], [ 101.928385, 33.447108 ], [ 101.897744, 33.558926 ], [ 101.848718, 33.603653 ], [ 101.830334, 33.558926 ], [ 101.769052, 33.541035 ], [ 101.762924, 33.456054 ], [ 101.695514, 33.438163 ], [ 101.646488, 33.330818 ], [ 101.738411, 33.268201 ], [ 101.683257, 33.20111 ], [ 101.634232, 33.102711 ], [ 101.487155, 33.227946 ], [ 101.407489, 33.227946 ], [ 101.382976, 33.151911 ], [ 101.321695, 33.245837 ], [ 101.278797, 33.268201 ], [ 101.174618, 33.272673 ], [ 101.119464, 33.223474 ], [ 101.156234, 33.151911 ], [ 101.143977, 33.057984 ], [ 101.180746, 33.044566 ], [ 101.180746, 32.986421 ], [ 101.125593, 32.990894 ], [ 101.119464, 32.914858 ], [ 101.186874, 32.892494 ], [ 101.2359, 32.816459 ], [ 101.217515, 32.718059 ], [ 101.156234, 32.664387 ], [ 101.064311, 32.682278 ], [ 100.929491, 32.601769 ], [ 100.837568, 32.650969 ], [ 100.770158, 32.642023 ], [ 100.684363, 32.677805 ], [ 100.708876, 32.610715 ], [ 100.659851, 32.615187 ], [ 100.665979, 32.525733 ], [ 100.616953, 32.543624 ], [ 100.574056, 32.557042 ], [ 100.555671, 32.57046 ], [ 100.549543, 32.57046 ], [ 100.506646, 32.628605 ], [ 100.476005, 32.691223 ], [ 100.402467, 32.758314 ], [ 100.335057, 32.718059 ], [ 100.261519, 32.744895 ], [ 100.237006, 32.722532 ], [ 100.212493, 32.606242 ], [ 100.108314, 32.642023 ], [ 100.089929, 32.673332 ], [ 100.138955, 32.727005 ], [ 100.12057, 32.838822 ], [ 100.040904, 32.932749 ], [ 99.955109, 32.950639 ], [ 99.948981, 32.986421 ], [ 99.875443, 33.049039 ], [ 99.85093, 32.941694 ], [ 99.777392, 32.923803 ], [ 99.789648, 32.865658 ], [ 99.728366, 32.727005 ], [ 99.709982, 32.762786 ], [ 99.587418, 32.794095 ], [ 99.569034, 32.829877 ], [ 99.372932, 32.90144 ], [ 99.268753, 32.888022 ], [ 99.231983, 32.986421 ], [ 99.189086, 33.040093 ], [ 99.091035, 33.075875 ], [ 98.992984, 33.089293 ], [ 98.845908, 33.165329 ], [ 98.80301, 33.223474 ], [ 98.809139, 33.263728 ], [ 98.760113, 33.286091 ], [ 98.784626, 33.362127 ], [ 98.7356, 33.4158 ], [ 98.723344, 33.509726 ], [ 98.649806, 33.545508 ], [ 98.662062, 33.590235 ], [ 98.619165, 33.639434 ], [ 98.649806, 33.661798 ], [ 98.60078, 33.719943 ], [ 98.539499, 33.751252 ], [ 98.46596, 33.849651 ], [ 98.410807, 33.872014 ], [ 98.404678, 33.930159 ], [ 98.441448, 33.983832 ], [ 98.392422, 34.06434 ], [ 98.416935, 34.095649 ], [ 98.239217, 34.082231 ], [ 98.079885, 34.126958 ], [ 98.043116, 34.118013 ], [ 97.951193, 34.189576 ], [ 97.810245, 34.207467 ], [ 97.773475, 34.16274 ], [ 97.65704, 34.126958 ], [ 97.699937, 34.04645 ], [ 97.65704, 34.010668 ], [ 97.638655, 33.925687 ], [ 97.601886, 33.934632 ], [ 97.45481, 33.889905 ], [ 97.393528, 33.894378 ], [ 97.369015, 33.836233 ], [ 97.405784, 33.791506 ], [ 97.430297, 33.679689 ], [ 97.405784, 33.634962 ], [ 97.448682, 33.581289 ], [ 97.52222, 33.581289 ], [ 97.516092, 33.523144 ], [ 97.552861, 33.464999 ], [ 97.663168, 33.451581 ], [ 97.755091, 33.411327 ], [ 97.718322, 33.380018 ], [ 97.712194, 33.375545 ] ] ], [ [ [ 102.11223, 33.290564 ], [ 102.11223, 33.295037 ], [ 102.106102, 33.295037 ], [ 102.11223, 33.290564 ] ] ] ] }, \"iso_3166_2\" : \"CN-SC\", \"division_code\" : \"51\", \"label_en\" : \"Sichuan\", \"label_zh\" : \"å\u009B\u009Bå·\u009Dç\u009C\u0081\" } } ] } }")

func splitFunc(data []byte, atEOF bool) (advance int, token []byte, err error) {
	dataLen := len(data)

	// Return nothing if at end of file and no data passed
	if atEOF && dataLen == 0 {
		return 0, nil, nil
	}

	// Find next separator and return token
	if i := bytes.Index(data, splitBytes); i >= 0 {
		return i + searchLen, data[0:i], nil
	}

	// If we're at EOF, we have a final, non-terminated line. Return it.
	if atEOF {
		return dataLen, data, nil
	}

	// Request more data.
	return 0, nil, nil
}

var matchKeyword = "_scroll_id"

func TestExtractIDFieldFromAsyncSearchJson(t *testing.T) {
	data := []byte("{\n  \"id\" : \"FktyZXA2bklVU2VDeWIwVWdkVTlMcGcdMWpuRkM3SDZSWWVBSTdKT1hkRDNkdzoyNDY3MjY=\",\n  \"is_partial\" : true,\n  \"is_running\" : true,\n  \"start_time_in_millis\" : 1601104032218,\n  \"expiration_time_in_millis\" : 1601536032218,\n  \"response\" : {\n    \"took\" : 1004,\n    \"timed_out\" : false,\n    \"terminated_early\" : false,\n    \"_shards\" : {\n      \"total\" : 11,\n      \"successful\" : 5,\n      \"skipped\" : 0,\n      \"failed\" : 0\n    },\n    \"hits\" : {\n      \"total\" : {\n        \"value\" : 10000,\n        \"relation\" : \"gte\"\n      },\n      \"max_score\" : null,\n      \"hits\" : [ ]\n    },\n    \"aggregations\" : {\n      \"sale_date\" : {\n        \"buckets\" : [\n          {\n            \"key_as_string\" : \"2020-03-14T00:00:00.000Z\",\n            \"key\" : 1584144000000,\n            \"doc_count\" : 1276\n          },\n          {\n            \"key_as_string\" : \"2020-03-15T00:00:00.000Z\",\n            \"key\" : 1584230400000,\n            \"doc_count\" : 3872\n          },\n          {\n            \"key_as_string\" : \"2020-03-16T00:00:00.000Z\",\n            \"key\" : 1584316800000,\n            \"doc_count\" : 3815\n          },\n          {\n            \"key_as_string\" : \"2020-03-17T00:00:00.000Z\",\n            \"key\" : 1584403200000,\n            \"doc_count\" : 3936\n          },\n          {\n            \"key_as_string\" : \"2020-03-18T00:00:00.000Z\",\n            \"key\" : 1584489600000,\n            \"doc_count\" : 3743\n          },\n          {\n            \"key_as_string\" : \"2020-03-19T00:00:00.000Z\",\n            \"key\" : 1584576000000,\n            \"doc_count\" : 3743\n          },\n          {\n            \"key_as_string\" : \"2020-03-20T00:00:00.000Z\",\n            \"key\" : 1584662400000,\n            \"doc_count\" : 3761\n          },\n          {\n            \"key_as_string\" : \"2020-03-21T00:00:00.000Z\",\n            \"key\" : 1584748800000,\n            \"doc_count\" : 3792\n          },\n          {\n            \"key_as_string\" : \"2020-03-22T00:00:00.000Z\",\n            \"key\" : 1584835200000,\n            \"doc_count\" : 3751\n          },\n          {\n            \"key_as_string\" : \"2020-03-23T00:00:00.000Z\",\n            \"key\" : 1584921600000,\n            \"doc_count\" : 3744\n          },\n          {\n            \"key_as_string\" : \"2020-03-24T00:00:00.000Z\",\n            \"key\" : 1585008000000,\n            \"doc_count\" : 2386\n          },\n          {\n            \"key_as_string\" : \"2020-03-25T00:00:00.000Z\",\n            \"key\" : 1585094400000,\n            \"doc_count\" : 3625\n          },\n          {\n            \"key_as_string\" : \"2020-03-26T00:00:00.000Z\",\n            \"key\" : 1585180800000,\n            \"doc_count\" : 6080\n          },\n          {\n            \"key_as_string\" : \"2020-03-27T00:00:00.000Z\",\n            \"key\" : 1585267200000,\n            \"doc_count\" : 45118\n          }\n        ]\n      }\n    }\n  }\n}\n")

	ok, id := ExtractFieldFromJson(&data, []byte("\"id\""), []byte("\"is_partial\""), []byte("id\""))
	fmt.Println(ok)
	fmt.Println(string(id))
	if ok {

		id = bytes.Replace(id, []byte(":"), nil, -1)
		id = bytes.Replace(id, []byte("\""), nil, -1)
		id = bytes.Replace(id, []byte(","), nil, -1)
		id = bytes.TrimSpace(id)

		fmt.Println(string(id))
		assert.Equal(t, "FktyZXA2bklVU2VDeWIwVWdkVTlMcGcdMWpuRkM3SDZSWWVBSTdKT1hkRDNkdzoyNDY3MjY=", string(id))
	}

	data = []byte("{\n  \"is_partial\" : false,\n  \"is_running\" : false,\n  \"start_time_in_millis\" : 1601105122480,\n  \"expiration_time_in_millis\" : 1601537122480,\n  \"response\" : {\n    \"took\" : 78,\n    \"timed_out\" : false,\n    \"num_reduce_phases\" : 3,\n    \"_shards\" : {\n      \"total\" : 11,\n      \"successful\" : 11,\n      \"skipped\" : 0,\n      \"failed\" : 0\n    },\n    \"hits\" : {\n      \"total\" : {\n        \"value\" : 10000,\n        \"relation\" : \"gte\"\n      },\n      \"max_score\" : null,\n      \"hits\" : [\n        {")

	ok, id = ExtractFieldFromJson(&data, []byte("\"id\""), []byte("\"is_partial\""), []byte("id\""))
	fmt.Println(ok)
	fmt.Println(string(id))

}

var data1 = []byte("},{\"field\":\"zeek.kerberos.valid.until\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.revoke.time\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.next\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.this\",\"format\":\"date_time\"},{\"field\":\"zeek.pe.compile_time\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.accessed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.changed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.created\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.modified\",\"format\":\"date_time\"},{\"field\":\"zeek.smtp.date\",\"format\":\"date_time\"},{\"field\":\"zeek.snmp.up_since\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.from\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.until\",\"format\":\"date_time\"}],\"_source\":{\"excludes\":[]},\"query\":{\"bool\":{\"must\":[],\"filter\":[{\"match_all\":{}},{\"range\":{\"@timestamp\":{\"gte\":\"2019-09-26T18:21:12.152Z\",\"lte\":\"2020-09-26T18:21:12.152Z\",\"format\":\"strict_date_optional_time\"}}}],\"should\":[],\"must_not\":[]}},\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"fragment_size\":2147483647}}")

func TestReplaceTimestampInBytes(t *testing.T) {

	ok, item := ExtractFieldFromJsonOrder(&data1, []byte("@timestamp"), []byte("strict_date_optional_time"), []byte("range"), true)
	//fmt.Println(string(item))
	//":{"gte":"2019-09-26T18:21:12.152Z","lte":"2020-09-26T18:21:12.152Z","format":"
	assert.Equal(t, "\":{\"gte\":\"2019-09-26T18:21:12.152Z\",\"lte\":\"2020-09-26T18:21:12.152Z\",\"format\":\"", string(item))

	//testing reverse
	ok, item = ExtractFieldFromJsonOrder(&data1, []byte("@timestamp"), []byte("strict_date_optional_time"), []byte("range"), false)
	assert.Equal(t, "\":{\"gte\":\"2019-09-26T18:21:12.152Z\",\"lte\":\"2020-09-26T18:21:12.152Z\",\"format\":\"", string(item))

	//fmt.Println(ok)
	//fmt.Println([]byte("T"))
	//fmt.Println([]byte("Z"))
	//fmt.Println([]byte("0"))
	//fmt.Println([]byte(":"))
	startProcess := false
	//totalPrecision:=9
	precisionLimit := 2
	precisionOffset := 0
	for i, v := range item {
		//fmt.Println("position:",i,string(v),",",precisionOffset)

		if v == 84 {
			startProcess = true
			precisionOffset = 0
			continue
		}
		if startProcess && v > 48 && v < 58 {
			precisionOffset++
			if precisionOffset <= precisionLimit {
				continue
			} else if precisionOffset > 9 {
				startProcess = false
				continue
			}
			item[i] = 48
			//fmt.Println(string(item))

		}

	}

	fmt.Println(string(item))

	assert.Equal(t, "\":{\"gte\":\"2019-09-26T18:00:00.000Z\",\"lte\":\"2020-09-26T18:00:00.000Z\",\"format\":\"", string(item))

	ok = ProcessJsonData(&data1, []byte("range"), 150, [][]byte{[]byte("gte"), []byte("lte")}, true, []byte("gte"), []byte("}"), 128, func(d []byte, start, end int) {
		startProcess := false
		precisionLimit := 2
		precisionOffset := 0
		fmt.Println("handle:", start, ",", end, ",", string(data1[start:end]))
		for i, v := range data1[start:end] {
			if v == 84 {
				startProcess = true
				precisionOffset = 0
				continue
			}
			if startProcess && v > 47 && v < 58 {
				precisionOffset++
				if precisionOffset <= precisionLimit {
					continue
				} else if precisionOffset > 9 {
					startProcess = false
					continue
				}
				fmt.Println(len(data1), ",", start, ",", i)
				data1[start+i] = 48

			}

		}
	})
	fmt.Println(ok)

	expected := "},{\"field\":\"zeek.kerberos.valid.until\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.revoke.time\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.next\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.this\",\"format\":\"date_time\"},{\"field\":\"zeek.pe.compile_time\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.accessed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.changed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.created\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.modified\",\"format\":\"date_time\"},{\"field\":\"zeek.smtp.date\",\"format\":\"date_time\"},{\"field\":\"zeek.snmp.up_since\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.from\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.until\",\"format\":\"date_time\"}],\"_source\":{\"excludes\":[]},\"query\":{\"bool\":{\"must\":[],\"filter\":[{\"match_all\":{}},{\"range\":{\"@timestamp\":{\"gte\":\"2019-09-26T18:00:00.000Z\",\"lte\":\"2020-09-26T18:00:00.000Z\",\"format\":\"strict_date_optional_time\"}}}],\"should\":[],\"must_not\":[]}},\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"fragment_size\":2147483647}}"

	fmt.Println(string(data1))
	fmt.Println(string(expected))
	assert.Equal(t, expected, string(data1))

	data = []byte("{\"version\":true,\"size\":500,\"sort\":[{\"@timestamp\":{\"order\":\"desc\",\"unmapped_type\":\"boolean\"}}],\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"calendar_interval\":\"1w\",\"time_zone\":\"Asia/Shanghai\",\"min_doc_count\":1}}},\"stored_fields\":[\"*\"],\"script_fields\":{},\"docvalue_fields\":[{\"field\":\"@timestamp\",\"format\":\"date_time\"},{\"field\":\"aws.cloudtrail.user_identity.session_context.creation_date\",\"format\":\"date_time\"},{\"field\":\"azure.auditlogs.properties.activity_datetime\",\"format\":\"date_time\"},{\"field\":\"azure.enqueued_time\",\"format\":\"date_time\"},{\"field\":\"azure.signinlogs.properties.created_at\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.agentReceiptTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.deviceCustomDate1\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.deviceCustomDate2\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.deviceReceiptTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.endTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.fileCreateTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.fileModificationTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.flexDate1\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.managerReceiptTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.oldFileCreateTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.oldFileModificationTime\",\"format\":\"date_time\"},{\"field\":\"cef.extensions.startTime\",\"format\":\"date_time\"},{\"field\":\"checkpoint.subs_exp\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.EndTimestamp\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.IncidentEndTime\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.IncidentStartTime\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.ProcessEndTime\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.ProcessStartTime\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.StartTimestamp\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.event.UTCTimestamp\",\"format\":\"date_time\"},{\"field\":\"crowdstrike.metadata.eventCreationTime\",\"format\":\"date_time\"},{\"field\":\"event.created\",\"format\":\"date_time\"},{\"field\":\"event.end\",\"format\":\"date_time\"},{\"field\":\"event.ingested\",\"format\":\"date_time\"},{\"field\":\"event.start\",\"format\":\"date_time\"},{\"field\":\"file.accessed\",\"format\":\"date_time\"},{\"field\":\"file.created\",\"format\":\"date_time\"},{\"field\":\"file.ctime\",\"format\":\"date_time\"},{\"field\":\"file.mtime\",\"format\":\"date_time\"},{\"field\":\"kafka.block_timestamp\",\"format\":\"date_time\"},{\"field\":\"misp.campaign.first_seen\",\"format\":\"date_time\"},{\"field\":\"misp.campaign.last_seen\",\"format\":\"date_time\"},{\"field\":\"misp.intrusion_set.first_seen\",\"format\":\"date_time\"},{\"field\":\"misp.intrusion_set.last_seen\",\"format\":\"date_time\"},{\"field\":\"misp.observed_data.first_observed\",\"format\":\"date_time\"},{\"field\":\"misp.observed_data.last_observed\",\"format\":\"date_time\"},{\"field\":\"misp.report.published\",\"format\":\"date_time\"},{\"field\":\"misp.threat_indicator.valid_from\",\"format\":\"date_time\"},{\"field\":\"misp.threat_indicator.valid_until\",\"format\":\"date_time\"},{\"field\":\"netflow.collection_time_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.exporter.timestamp\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_end_microseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_end_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_end_nanoseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_end_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_start_microseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_start_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_start_nanoseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.flow_start_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.max_export_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.max_flow_end_microseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.max_flow_end_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.max_flow_end_nanoseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.max_flow_end_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.min_export_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.min_flow_start_microseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.min_flow_start_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.min_flow_start_nanoseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.min_flow_start_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.monitoring_interval_end_milli_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.monitoring_interval_start_milli_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.observation_time_microseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.observation_time_milliseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.observation_time_nanoseconds\",\"format\":\"date_time\"},{\"field\":\"netflow.observation_time_seconds\",\"format\":\"date_time\"},{\"field\":\"netflow.system_init_time_milliseconds\",\"format\":\"date_time\"},{\"field\":\"package.installed\",\"format\":\"date_time\"},{\"field\":\"process.parent.start\",\"format\":\"date_time\"},{\"field\":\"process.start\",\"format\":\"date_time\"},{\"field\":\"suricata.eve.flow.end\",\"format\":\"date_time\"},{\"field\":\"suricata.eve.flow.start\",\"format\":\"date_time\"},{\"field\":\"suricata.eve.timestamp\",\"format\":\"date_time\"},{\"field\":\"suricata.eve.tls.notafter\",\"format\":\"date_time\"},{\"field\":\"suricata.eve.tls.notbefore\",\"format\":\"date_time\"},{\"field\":\"tls.client.not_after\",\"format\":\"date_time\"},{\"field\":\"tls.client.not_before\",\"format\":\"date_time\"},{\"field\":\"tls.server.not_after\",\"format\":\"date_time\"},{\"field\":\"tls.server.not_before\",\"format\":\"date_time\"},{\"field\":\"zeek.kerberos.valid.from\",\"format\":\"date_time\"},{\"field\":\"zeek.kerberos.valid.until\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.revoke.time\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.next\",\"format\":\"date_time\"},{\"field\":\"zeek.ocsp.update.this\",\"format\":\"date_time\"},{\"field\":\"zeek.pe.compile_time\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.accessed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.changed\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.created\",\"format\":\"date_time\"},{\"field\":\"zeek.smb_files.times.modified\",\"format\":\"date_time\"},{\"field\":\"zeek.smtp.date\",\"format\":\"date_time\"},{\"field\":\"zeek.snmp.up_since\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.from\",\"format\":\"date_time\"},{\"field\":\"zeek.x509.certificate.valid.until\",\"format\":\"date_time\"}],\"_source\":{\"excludes\":[]},\"query\":{\"bool\":{\"must\":[],\"filter\":[{\"match_all\":{}},{\"range\":{\"@timestamp\":{\"gte\":\"2019-09-26T09:21:17.673Z\",\"lte\":\"2020-09-26T09:21:17.673Z\",\"format\":\"strict_date_optional_time\"}}}],\"should\":[],\"must_not\":[]}},\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"fragment_size\":2147483647}}\n")

	ProcessJsonData(&data, []byte("range"), 150, [][]byte{[]byte("gte"), []byte("lte")}, true, []byte("gte"), []byte("?"), 128, func(d []byte, start, end int) {
		startProcess := false
		precisionLimit := 2
		precisionOffset := 0
		for i, v := range data[start:end] {
			if v == 84 {
				startProcess = true
				precisionOffset = 0
				continue
			}
			if startProcess && v > 47 && v < 58 {
				precisionOffset++
				if precisionOffset <= precisionLimit {
					continue
				} else if precisionOffset > 9 {
					startProcess = false
					continue
				}
				data[start+i] = 48
			}

		}
	})

	//fmt.Println(string(data))
}

func TestExtractFieldFromJson(t *testing.T) {

	input := "{ \"_scroll_id\" : \"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\", \"took\" : 20, \"timed_out\" : false, \"_shards\" : { \"total\" : 1, \"successful\" : 1, \"skipped\" : 0, \"failed\" : 0 }, \"hits\" : { \"total\" : { \"value\" : 34, \"relation\" : \"eq\" }, \"max_score\" : 1.0 }}"
	inputBytes := []byte(input)
	scanner := bufio.NewScanner(bytes.NewReader(inputBytes))
	scanner.Split(splitFunc)
	i := 0
	var str string
	for scanner.Scan() {
		//fmt.Println(i, ": ", scanner.Text())
		text := scanner.Text()
		if ContainStr(text, matchKeyword) {
			str = text
			break
		}
		i++
	}

	// { "_scroll_id" : "FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==
	if len(str) > 0 {
		offset := strings.LastIndex(str, "\"")
		if offset > 0 && offset < len(str) {
			newStr := str[offset+1 : len(str)]
			//fmt.Println(newStr)
			assert.Equal(t, "FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==", newStr)
		}
	}

	hit, str1 := ExtractFieldFromJsonOrder(&inputBytes, []byte("\""), splitBytes, []byte("_scroll_id"), true)
	assert.Equal(t, true, hit)
	assert.Equal(t, "FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==", string(str1))

	data := []byte("{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFENid0hGWFFCbVRLSFpIbTN0Z18wAAAAAAA0TTsWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":527,\"timed_out\"")
	hit, str1 = ExtractFieldFromJson(&data, []byte("\""), splitBytes, []byte("_scroll_id"))
	//fmt.Println(hit)
	//fmt.Println((string(str1)))

	hit, str1 = ExtractFieldFromJsonOrder(&inputBytes, []byte("\"_scroll_id\" : \""), []byte("\","), []byte("_scroll_id"), false)
	//fmt.Println("str1:", string(str1))
	assert.Equal(t, true, hit)
	assert.Equal(t, "FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==", string(str1))

	data = []byte("{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFENid0hGWFFCbVRLSFpIbTN0Z18wAAAAAAA0TTsWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":527,\"timed_out\"")
	hit, str1 = ExtractFieldFromJsonOrder(&data, []byte("_scroll_id\":\""), []byte("\","), []byte("_scroll_id"), false)
	//fmt.Println(hit)
	//fmt.Println((string(str1)))

}

type MatchOrder string

const LEFT MatchOrder = "START"
const RIGHT MatchOrder = "END"

type MatchPair struct {
	StartOrder MatchOrder
	StartWith  []byte
	EndWith    []byte

	TrimLeft  []byte
	TrimRight []byte

	//SplitBy []byte
	//LeftKeyPart bool
	MustContain []byte
}

//func ExtractText(data *[]byte, matchRules []MatchPair) (bool, []byte) {
//
//	for _,v:=range matchRules{
//
//		//go from let to right
//		if v.StartOrder==LEFT{
//			startWith:=bytes.Index(*data,v.StartWith)
//			//fmt.Println("start with: ",startWith)
//		}
//
//		//get key position
//		bytes.Index(*data,v.SplitBy)
//
//	}
//
//
//
//	return false, nil
//}

//func TestExtractText(t *testing.T) {
//	input1 := []byte("{ \"_scroll_id\" : \"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\", \"took\" : 20, \"timed_out\" : false, \"_shards\" : { \"total\" : 1, \"successful\" : 1, \"skipped\" : 0, \"failed\" : 0 }, \"hits\" : { \"total\" : { \"value\" : 34, \"relation\" : \"eq\" }, \"max_score\" : 1.0 }}")
//	input2 := []byte("{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFENid0hGWFFCbVRLSFpIbTN0Z18wAAAAAAA0TTsWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":527,\"timed_out\"")
//
//	rules := []MatchPair{
//		MatchPair{SplitBy: []byte("\"took\""), StartWith: []byte("\""), EndWith: []byte("\"")},
//		MatchPair{SplitBy: []byte("\"took\""), StartWith: []byte("\""), EndWith: []byte("\"")},
//	}
//
//	hit1,text1:=ExtractText(&input1, rules)
//	hit2,text2:=ExtractText(&input2, rules)
//	assert.Equal(t,true,hit1)
//	assert.Equal(t,true,hit2)
//
//	assert.Equal(t,"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFG43dnRGSFFCbVRLSFpIbTNZYWFTAAAAAAA0NsQWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==",text1)
//	assert.Equal(t,"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFENid0hGWFFCbVRLSFpIbTN0Z18wAAAAAAA0TTsWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==",text2)
//
//}

func BenchmarkLastIndex(b *testing.B) {
	item := []byte("took")
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		//BytesIndex(&data, &item, false)
		//BytesIndex(&data,&item,true)
		bytes.Index(data, item)
		//bytes.LastIndex(data,item)
	}
}

func BenchmarkBytesHasPrefix(b *testing.B) {
	item := []byte("took")
	prefix := []byte("to")
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		BytesHasPrefix(item, prefix)
	}
}

func TestLastIndex(t *testing.T) {

	data := []byte("i am groot!")
	//fmt.Println(data)
	item := []byte("am")
	//fmt.Println(item)
	itemLength := len(item)
	lastHit := item[itemLength-1]
	//fmt.Println(lastHit)

	//fmt.Println("last index: ", bytes.LastIndex(data, item))

	candidateBuffer := make([]byte, itemLength)

	candidateOffset := itemLength - 1
	startMatch := false
	if last := len(data) - 1; last >= 0 {
		for i, element := last, data[0]; i >= 0; i-- {
			element = data[i]
			//fmt.Printf("Reverse range: [%v] %+v\n", i, element)

			//fmt.Println("candidate match: ", startMatch)
			//fmt.Println("candidate offset: ", candidateOffset)
			//fmt.Println("candidate buffer: ", candidateBuffer)

			//start to match if not started and match with last char
			if !startMatch && element == lastHit {
				startMatch = true
				//fmt.Println("hit last char, start try to match")
				candidateBuffer[candidateOffset] = element
				candidateOffset--

			} else if startMatch && candidateOffset >= 0 {
				candidateBuffer[candidateOffset] = element
				candidateOffset = itemLength - 1

				if bytes.Equal(candidateBuffer, item) {
					//fmt.Println("hit final offset: ", i)
					//fmt.Println("buffer: ", candidateBuffer)
					return
				} else {
					startMatch = false
				}
			}
		}
	} else {
		//fmt.Println("mySlice empty")
	}
}

func TestExtractFieldFromJson1(t *testing.T) {
	//{ "index" : { "_index" : "test", "_id" : "1" } }
	//{ "delete" : { "_index" : "test", "_id" : "2" } }
	//{ "create" : { "_index" : "test", "_id" : "3" } }
	//{ "update" : {"_id" : "1", "_index" : "test"} }
	data := []byte("{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }")
	data1 := []byte("{\"index\":{\"_index\":\"medcl1\",\"_type\":\"_doc\",\"_id\":\"GZq-bnYBC53QmW9Kk2ve\"}}")

	start := []byte("\"")
	end := []byte("\"")
	//matchStart:=false
	//matchEnd:=false
	//
	//buffer:=bytes.Buffer{}
	//toBeMachedBuffer:=bytes.Buffer{}
	//for i,v:=range data{
	//	toBeMachedBuffer.WriteByte(v)
	//
	//	if matchStart&&matchEnd{
	//		//fmt.Println(buffer.String())
	//		break
	//	}
	//
	//	if matchStart&&!matchEnd{
	//		//collecting data
	//		//check whether matched end
	//		if bytes.HasSuffix(toBeMachedBuffer.Bytes(),end){
	//			matchEnd=true
	//			toBeMachedBuffer.Reset()
	//		}else{
	//			buffer.WriteByte(v)
	//		}
	//		continue
	//	}
	//
	//	if !matchStart{
	//		if bytes.HasSuffix(toBeMachedBuffer.Bytes(),start){
	//		//v==start[0]{
	//			matchStart=true
	//			toBeMachedBuffer.Reset()
	//			//fmt.Println("matched start:",i)
	//			continue
	//		}
	//	}
	//
	//
	//}
	value := ExtractFieldFromBytes(&data, start, end, nil)
	fmt.Println(string(value))
	assert.Equal(t, "index", string(value))

	value = ExtractFieldFromBytes(&data1, start, end, nil)
	fmt.Println(string(value))

	start = []byte("\"_index\"")
	end = []byte("\",")
	filteredFromValue := []byte(": \"")
	value = ExtractFieldFromBytes(&data, start, end, filteredFromValue)
	fmt.Println(string(value))
	assert.Equal(t, "test", string(value))

	value = ExtractFieldFromBytes(&data1, start, end, filteredFromValue)
	fmt.Println(string(value))

	start = []byte("\"_id\"")
	end = []byte("}")
	filteredFromValue = []byte(": \"")
	value = ExtractFieldFromBytes(&data, start, end, filteredFromValue)
	fmt.Println(string(value))
	assert.Equal(t, "1", string(value))

	value = ExtractFieldFromBytes(&data1, start, end, filteredFromValue)
	fmt.Println(string(value))

}

func TestExtractFieldFromJson2(t *testing.T) {
	data1 := []byte("{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFDlMMWJGWFFCbVRLSFpIbTNXVm1GAAAAAAA0lIsWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":1,\"timed_out\":false,\"terminated_early\":false,\"_shards\":{\"total\":1,\"successful\":1,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":{\"value\":1,\"relation\":\"eq\"},\"max_score\":1.0,\"hits\":[]}}")
	hit, str1 := ExtractFieldFromJson(&data1, []byte("hits\":{\"total\":{\"value\":"), []byte(",\"relation\""), []byte("\"total\":{\"value\""))
	//fmt.Println(hit)
	//fmt.Println((string(str1)))
	assert.Equal(t, "1", string(str1))
	assert.Equal(t, true, hit)

	data2 := []byte("{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFDRzTGhGblFCbVRLSFpIbTNpdllBAAAAAAA116kWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":1,\"timed_out\":false,\"_shards\":{\"total\":1,\"successful\":1,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":{\"value\":5,\"relation\":\"eq\"},\"max_score\":1.0,\"hits\":[{\"_index\":\"china_provinces_v1\",\"_type\":\"_doc\",\"_id\":\"q4l7pnIBLg-rvzvwS3nG\",\"_score\":1.0,\"_source\":{\"coordinates\":{\"type\":\"polygon\",\"coordinates\":[[[104.526735,24.7343],[104.489966,24.658264],[104.502223,24.582228],[104.54512,24.524083],[104.575761,24.421211],[104.624786,24.416738],[104.606402,24.376484],[104.698324,24.322812],[104.722837,24.33623],[104.710581,24.443575],[1")
	hit, str1 = ExtractFieldFromJson(&data2, []byte("hits\":{\"total\":{\"value\":"), []byte(",\"relation\":\""), []byte("\"total\":{\"value\""))
	//fmt.Println(hit)
	//fmt.Println((string(str1)))
	assert.Equal(t, "5", string(str1))

}

func TestBytesEndWith(t *testing.T) {
	//check if scroll is over
	//{"_scroll_id":"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFHpiMUpGWFFCbVRLSFpIbTMxQkdjAAAAAAA0hXcWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==","took":1,"timed_out":false,"terminated_early":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":10,"relation":"eq"},"max_score":1.0, "hits":[]}}
	str := "{\"_scroll_id\":\"FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFHpiMUpGWFFCbVRLSFpIbTMxQkdjAAAAAAA0hXcWMWpuRkM3SDZSWWVBSTdKT1hkRDNkdw==\",\"took\":1,\"timed_out\":false,\"terminated_early\":false,\"_shards\":{\"total\":1,\"successful\":1,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":{\"value\":10,\"relation\":\"eq\"},\"max_score\":1.0, \"hits\":[]}}"

	d := []byte(str)
	ending := []byte("\"hits\":[]}}")
	offset := bytes.LastIndex(d, ending)
	//fmt.Println(len(d))
	//fmt.Println(len(ending))
	//fmt.Println(offset)

	//fmt.Println(len(d)-offset <= len(ending))
	assert.Equal(t, true, len(d)-offset <= len(ending))

	assert.Equal(t, true, BytesHasSuffix(d, ending))
}

func TestBytesEndWith1(t *testing.T) {

	str := []byte("asdfas\n")

	ending := []byte("\n")
	assert.Equal(t, true, BytesHasSuffix(str, ending))
}

func TestBytesStartWith1(t *testing.T) {

	str := []byte("\nasdfas")

	start := []byte("\n")
	assert.Equal(t, true, BytesHasPrefix(str, start))
}

func TestToLowercase(t *testing.T) {
	str := []byte("AZazUPPERcase")

	//printStr(str)
	ToLowercase(str)
	//fmt.Println("lowercased:")
	assert.Equal(t, "azazuppercase", string(str))
	//printStr(str)
	ToUppercase(str)
	//fmt.Println("uppercased:")
	assert.Equal(t, "AZAZUPPERCASE", string(str))
	//printStr(str)
}

// func printStr(str []byte) {
// 	for i, s := range str {
// 		fmt.Println(i, "-", s, "-", string(s))
// 	}
// }

func TestBytesLength(t *testing.T) {
	a := []byte("0000000000")
	fmt.Println(len(a))
	fmt.Println(cap(a))
	a = a[0:6]
	fmt.Println(len(a))
	fmt.Println(cap(a))

}

func TestUInt32ToBytes(t *testing.T) {
	var v uint32 = 4294967294
	bytes := make([]byte, 4)
	Uint32toBytes(bytes, v)
	//fmt.Println(bytes)
	eBytes := []byte{255, 255, 255, 254}
	assert.Equal(t, eBytes, bytes)
	x := BytesToUint32(bytes)
	//fmt.Println(x)
	assert.Equal(t, v, x)
}

func TestLimitedBytesSearch(t *testing.T) {
	data := []byte("{\"took\":2,\"errors\":true,\"items\":[{\"index\":{\"_index\":\"medcl4new1245123-6\",\"_type\":\"_doc\",\"_id\":\"fAxjc3YBC53QmW9KWg_8\",\"status\":429,\"error\":{")

	term := []byte("\"errors\":true")
	limit := 64
	//buffer:=make([]byte,len(term))
	//start:=false
	//bufferOffset:=0
	//for i,v:=range data{
	//	if i>limit{
	//		return
	//	}
	//	if!start{
	//		if term[0]==v{
	//			start=true
	//			bufferOffset=0
	//			buffer=append(buffer,v)
	//		}
	//	}else{
	//		if  len(buffer)==len(term){
	//			//fmt.Println("matched!",string(buffer)," vs ",string(term))
	//			return
	//		}
	//
	//		bufferOffset++
	//		if term[bufferOffset]==v{
	//			buffer=append(buffer,v)
	//		}else{
	//			start=false
	//			buffer=[]byte{}
	//		}
	//
	//	}
	//
	//
	//}

	ok := LimitedBytesSearch(data, term, limit)
	assert.Equal(t, true, ok)

	term = []byte("\"errors\":false")
	ok = LimitedBytesSearch(data, term, limit)
	assert.Equal(t, false, ok)
}

func TestBytesSearchValue(t *testing.T) {
	data := []byte("{\n  \"id\" : \"FnZGLWN4OXRpVGItTVZtdzZ1U2hGTEEdMWpuRkM3SDZSWWVBSTdKT1hkRDNkdzoxMTU2OTE=\",\n  \"is_partial\" : true,\n  \"is_running\" : true,\n  \"start_time_in_millis\" : 1601100879183,\n  \"expiration_time_in_millis\" : 1601100948312,\n  \"response\" :")
	startTerm := []byte("\"is_running\"")
	index := bytes.Index(data, startTerm)
	fmt.Println(index)
	leftData := data[index+len(startTerm):]
	fmt.Println(string(leftData))

	endTerm := []byte(",")

	endIndex := bytes.Index(leftData, endTerm)
	fmt.Println(endIndex)
	lastTerm := leftData[0:endIndex]
	fmt.Println(string(lastTerm))
	bytes.TrimSpace(lastTerm)
	//fmt.Println(string(lastTerm))

	searchTrim := []byte("true")
	if bytes.Contains(lastTerm, searchTrim) {
		fmt.Println("found term:", string(searchTrim))
	}

	fmt.Println(BytesSearchValue(data, startTerm, endTerm, searchTrim))

}

func BenchmarkLimitedBytesSearch(b *testing.B) {
	data := []byte("{\"took\":2,\"errors\":true,\"items\":[{\"index\":{\"_index\":\"medcl4new1245123-6\",\"_type\":\"_doc\",\"_id\":\"fAxjc3YBC53QmW9KWg_8\",\"status\":429,\"error\":{")
	term := []byte("\"errors\":true")
	limit := 64
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		LimitedBytesSearch(data, term, limit)
	}
}

func BenchmarkJsonParser(b *testing.B) {
	data := []byte("{\"took\":2,\"errors\":true,\"items\":[{\"index\":{\"_index\":\"medcl4new1245123-6\",\"_type\":\"_doc\",\"_id\":\"fAxjc3YBC53QmW9KWg_8\",\"status\":429,\"error\":{")
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		ok, _ := jsonparser.GetBoolean(data, "errors")
		assert.Equal(b, true, ok)
	}
}

func BenchmarkWalkBytesAndReplace(b *testing.B) {
	data := []byte("{\"took\":2,\"errors\":true,\"items\":[{\"index\":{\"_index\":\n\"medcl4new1245123-6\",\n\"_type\":\"_doc\",\"_id\":\"fAxjc3YBC53QmW9KWg_8\",\n\"status\":429,\n\"error\":{")
	fmt.Println(string(data))
	WalkBytesAndReplace(data, NEWLINE, SPACE)
	fmt.Println(string(data))

}
